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

Switch from menu order to product date

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 […]

Custom styles for TinyMCE 4.0 in WordPress 3.9

Add style options to the rich text editor

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 […]