WooCommerce: Bulk Re-Send All Customer’s Completed Order Emails
This is quite an uncommon WooCommerce requirement, but especially for downloadable products the Completed Order email is such as important one – and customers may end up asking you to resend them all their past order emails.
This is an interesting snippet, as it features important functionalities: getting orders by billing email, looping through the results and re-triggering the Completed Order email whenever a specific admin URL parameter is posted. Enjoy!
PHP Snippet: Trigger All Customer’s Past Order Emails @ WooCommerce Admin
While logged in as administrator and in the WordPress dashboard, add parameter “cust-email” with value = a customer’s billing email, hit enter, and the below snippet will trigger.
This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101
WooCommerce: Add Second Description @ Product Category Pages In terms of SEO, if you’re trying to rank your product category pages, you really need to make the most of the default WooCommerce product category “description” and “thumbnail”. Most themes, if compatible with WooCommerce, will show this content right below the product category name and above products. Nothing new so far. But what if […]
WooCommerce: Add Content to a Specific Order Email Customizing WooCommerce emails via the WordPress dashboard is not easy and – sometimes – not possible. For example, you can’t edit or add content to them unless you’re familiar with code. Well, here’s a quick example to learn how to add content to any WooCommerce default order email. In this case study, our goal is […]
WooCommerce: Get Order Info (total, items, etc) From $order Object As a WooCommerce development freelancer, every day I repeat many coding operations that make me waste time. One of them is: “How to get ____ if I have the $order variable/object?“. For example, “How can I get the order total“? Or “How can I get the order items“? Or maybe the order dates, customer ID, […]
WooCommerce: How to Add a Custom Checkout Field Let’s imagine you want to add a custom checkout field (and not an additional billing or shipping field) on the WooCommerce Checkout page. For example, it might be a customer licence number – this has got nothing to do with billing and nothing to do with shipping. Ideally, this custom field could show above the […]
WooCommerce Visual Hook Guide: Emails WooCommerce customizers: the Visual Hook Guide is back! Here’s a visual HTML hook guide for the WooCommerce Emails. This visual guide belongs to my “Visual Hook Guide Series“, that I’ve put together so that you can find WooCommerce hooks quickly and easily by seeing their actual locations. Let me know in the comments if this […]
Business Bloomer Founder
Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli