Woocommerce get billing state manually

To avoid that error, you have to add something in your function like: add_filter( ‘woocommerce_email_recipient_new_order’, ‘tm_destinatario_condicionado_wc’, 10, 2 ); function tm_destinatario_condicionado_wc( $recipient, $order ) { // To avoid an error in backend if( ! is_a($order, ‘WC_Order’) ) return $recipient; $estados = array( ‘aguascalientes’ => ‘AG’, ‘baja-california’ => ‘BC’, // etc etc … ); // Get … Read more

Howto disable comment moderation emails for admins, but not for authors

you can make a plugin out of the following code that removes an email from the recipients list and network activate it function wpse158530_filter_emails($emails,$cid) { if (count($emails) > 1) { // you don’t want to remove yourself if you are the author as well as admin // based on http://stackoverflow.com/questions/17252880/remove-value-from-array-in-php if(($key = array_search(your email address, … Read more

3 different mail notifications

Unless for some reason you need this to be hardcoded into your theme or have full control over your own plugin, you could use the existing Peter’s Collaboration Emails plugin. If installing a plugin is not an option, I’d suggest modifying the above or borrowing some of its code, respectively. It can do all the … Read more

Notice bar at frontpage for multisite

You can use the adminbar on front. Plus you can customize it to your needs. Example on how to add a node // Read here 1) function nacin_promote_network_admin_in_toolbar( $wp_admin_bar ) { $wp_admin_bar->add_node( array( ‘id’ => ‘network-admin’, ‘parent’ => false, ) ); } add_action( ‘admin_bar_menu’, ‘nacin_promote_network_admin_in_toolbar’, 25 ); 1) Read on WPDevel how to add/remove_nodes in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)