Category: Snippets
-
Add BCC to WooCommerce Emails
Sometimes you need to send WooCommerce emails to more people than you can do via the main plugin settings. Or, you need to quietly BCC somebody, like a vendor, etc. You can achieve that by modifying the email headers on the woocommerce_email_headers filter. To achieve this you can add the following snippet to your theme’s…
-
Change the sort order of WooCommerce Grouped Products
WooCommerce has a small army of filters and hooks that you could customize almost every aspect of the plugin. If you have a grouped product the default display method is by menu_order. But recently, someone wanted to display the grouped items by the date they were published. This is very easily accomplished by filtering the…
-
Modifying the WooCommerce Product Query
UPDATE 9/28/2019: Example 2 no longer works as WooCommerce now links the product in a grouped product via meta data instead of via post_parent. I recently answered a few questions on Stack Overflow and they all seemed to related to how to change what products show up in the shop loop… or any other of…
-
Custom styles for TinyMCE 4.0 in WordPress 3.9
The release of WordPress 3.9 saw the update of the included TinyMCE editor to version of 4.0 and this caused no small amount of havoc for people who’d been customizing the text editor. In the past, one was able to define one’s own custom styles and modify the block formats like so: function my_mce_buttons_2( $buttons…