You may need to show coupon details in the WooCommerce order email. This option is not available by default. We can use woocommerce_email_after_order_table action hook to show used coupon details in order email. This will show coupon details after the order table in the order email. We can get coupon… Read More »
Show sold out badge on WooCommerce search result
Previously we have learned how to show sold out badge on WooCommerce store and archive pages. But that method does not work on search results. We have used woocommerce_before_shop_loop_item_title action hook for store page and category/archive pages. But this hook is not available on search result page. So we will… Read More »
Exclude out of stock WooCommerce products from search result
WooCommerce out of stock products can be excluded from search result by using the _stock_status meta key of products. This meta key checks if a product is in stock or not. We can modify search query using pre_get_posts action hook and load only instock products. Code goes in the functions.php… Read More »
Display all WordPress hooks sequentially for any page
What is the nice and easy way to see all the hooks that run in WordPress during a page load? How do you see them sequentially when things/contents are being loaded? WordPress has a special hook named all which runs for every single hook. From WordPress doc: If you want… Read More »
Show sold out badge to WooCommerce Store
If you are looking for a sold out badge for WooCommerce store out of stock products without a plugin, you are at the right place. Keep going through the article to easily accomplish your goal. A nice ‘sold out’ badge on products image, on the shop page or product category… Read More »
How to add purchase note to WooCommerce order email
During checkout on WooCommerce, customer can add a note. This note is visible for admins on order edit screen of WordPress admin. After placing the order, customer receives an email with order details. This email does not contain that purchase not. But did you ever needed to show this note… Read More »
How to add product SKU to WooCommerce order email
When a new order is placed in WooCommerce, customer receives an email with order items. But it does not include product SKU. It might be necessary for many people to show product SKU in order email. We can add product SKU to order email easily using woocommerce_email_order_items_args filter. We can… Read More »
How to add images to WooCommerce order email
When a new order is placed in WooCommerce, customer receives an email with order items. But it does not include product images. We can add product images to order email using woocommerce_email_order_items_args filter. We can also control the image sizes to display on the email. Above code will display product… Read More »
Create an email sending form in WordPress admin using Advanced Custom Fields (ACF)
We can use Advanced Custom Fields (ACF) to create email sending form in WordPress Admin panel easily. This can be useful if you want to create an invitation system or manually send emails to your users or others. We will use wp_mail function with acf/save_post action hook. So when we… Read More »
Show LearnDash enrolled courses on WooCommerce My Account page
We can easily show enrolled courses of current logged in users using the ld_profile shortcode of LearnDash. We can use this shortcode in WooCommerce My Account (user dashboard) page as well. The ld_profile shortcode is actually to show user profile, which contains all enrolled courses with progress. This shortcode will… Read More »