How do I hide the purchase note in the WooCommerce ‘order completed’ email?

I think you’re correct about that code snippet only checking the for the availability of the email. But you can probably still make your alternative approach work: the WC_Email classes set $sending to true when they’re in the process of sending. So you could check something like: WC()->mailer()->emails[“WC_Email_Customer_Completed_Order”]->sending

WooCommerce: The model of e-mail is displaying only the html, not css [closed]

Well, I tested a lot of WooCommerce versions (3.3.x, 3.4.x and 3.5.x) using WP Rollback and I believe that was a error in e-mail templates that was fixed in version 3.5.2. I didn’t found nothing in the changelog about that: https://raw.githubusercontent.com/woocommerce/woocommerce/master/CHANGELOG.txt Here is the template in WooCommerce in version 3.5.2: I have to investigate more … Read more

Show add to cart button on shop woocommerce

Point 1: To change “VEDI PRODOTTO” (view product) button instead of “Add to Cart” button on product archives: Put below code in functions.php file. remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’ ); add_action(‘woocommerce_after_shop_loop_item’, ‘add_a_custom_button’, 5 ); function add_a_custom_button() { global $product; if( $product->is_type(‘variable’) || $product->is_type(‘grouped’) ) return; echo ‘<div style=”margin-bottom:10px;”> <a class=”button custom-button” href=”‘ . esc_attr( $product->get_permalink() ) . … Read more

Remove Dashboard button from menu in my account page – WooCommerce

This requires 2 different hooked functions: The first function will remove the first my account menu item (which is the dashboard). The second function will redirect the default my account dashboard page to the first my account endpoint. The code: // Remove the first menu item (the dashboard) add_filter( ‘woocommerce_account_menu_items’, ‘account_menu_items_callback’ ); function account_menu_items_callback( $items … Read more