Changing the HTML of notices in WooCommerce [closed]

After talking with some of the WooCommerce people on Slack, I realized that the problem here is probably this pattern, in frontend/cart.js – due to the fact, that my store uses the AJAX functionality that WooCommerce provides. var show_notice = function( html_element, $target ) { if ( ! $target ) { $target = $( ‘.woocommerce-notices-wrapper:first’ … Read more

How can I send the mail once?

You can use meta to create a one time action something like this $order_id = $order->get_id(); if (get_post_meta($order_id, ‘is_mail_sent’, true)) return; update_post_meta($order_id, ‘is_mail_sent’, true); Add this right after the opening of the if block This code will first check if the order meta value of is_mail_sent is true, if true it will return (exit) from … Read more