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 »
Category: WooCommerce
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 »
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 »
Show LearnDash purchased course details on WooCommerce thank you page
LearnDash integrates well with WooCommerce. But there are certain caveats. When an order is placed for a LearnDash course, from WooCommerce, it only shows regular WooCommerce order data with regular WooCommerce products, which were just purchased. But it doesn’t show anything about the purchased courses. If we can show some… Read More »
Hide other shipping options in WooCommerce if free shipping is available
It does not look very ideal to show paid shipping options when free shipping is available, unless they are for express delivery. There is no way to set this up directly from WooCommerce. But we can do this easily by modifying available shipping options/rates using woocommerce_package_rates filter. Following code block… Read More »
Deny PO Box addresses in WooCommerce
Many of you may not want to allow Post Office Box as shipping address. There is no default option in WooCommerce to do it. We can use woocommerce_after_checkout_validation action hook to check if inputted shipping address contains PO Box address or not. Following code checks for the string pobox in… Read More »
Customizing WooCommerce product single page tabs (data tabs)
WooCommerce product single page has three tabs by default: Description Additional Information Reviews We can edit them, reorder them, delete them or add new tabs by using woocommerce_product_tabs filter. If you do a print_r, this is how the default array looks like: Remove Tabs Following snippets demonstrates how to remove… Read More »
Redirect WooCommerce single product page
Redirect to add-to-cart url Instead of showing a single product page, we can add the product to shopping cart, when someone clicks on the single product link or tries to browse the product page with a direct link. This only works for simple product type and simple subscription product type,… Read More »
WooCommerce redirect to custom page after registration
When registrations are open without purchasing any product, by default WooCommerce uses registration form on my-account page. After successful registration, users are redirected to my-account page. Might not be the best way to showcase your shop. Some user might want to redirect recently registered users to a custom page, some… Read More »
Remove shipping address section from WooCommerce Checkout page
By default, clicking on the “Ship to a different address?” checkbox on WooCommerce checkout page displays the shipping fields. Shipping fields can be turned off from WooCommerce Settings. It’s under WooCommerce > Settings > Shipping > Shipping options page. There, select Force shipping to the customer billing address for Shipping… Read More »
