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
Related Posts:
- WooCommerce lost password reset flow not working with SendGrid (redirect loop)
- Preventing WooCommerce email sending only on particular conditions
- woocommerce fail to replace template string in email title [closed]
- WooCommerce: display text instead of raw checkbox value email
- Editing Header Titles of each details in woocommerce Order Email [closed]
- Woocommerce : How to attach an custom attachment with customer-processing-order.php email template [closed]
- WooCommerce email text based on category && shipping zone && payment method [closed]
- WooCommerce: Email Notifications
- woocommerce_email_attachments filter arguments [closed]
- WordPress ‘on behalf of’ email
- WooCommerce: The model of e-mail is displaying only the html, not css [closed]
- Add custom order meta to Order Completed email
- Woocommerce: Prevent sending of email when order is “Completed”
- How to add a user custom field into Woocommerce emails?
- Custom Admin Email Subject for Woocommerce (3.8.0) Orders
- WooCommerce order complete email logic
- woocommerce email template detect email recipient
- Adding extra email address who receives email like admin – woocommerce
- Add shipping address to Woocommerce order emails [closed]
- Send email notifications to a defined email address depending if a product in order has a specific TAG [closed]
- Woocommerce emails from gmail not being sent
- Send admin new order email to logged in user as well
- Create new email in WooCommerce
- How to check if woocommerce_order_item_name is use in email?
- WordPress woocommerce new order email not working
- Custom Email via Hook only for completed order
- Access custom meta_data in processing order email
- How to add (and change the font of) the short product description to order page and customer’s new order e-mail [closed]
- How to send Woocommerce Customer Details (Name, Email and Phone Number) to Admin upon signup
- How to change lost password email text using custom plugin wordpress?
- Using admin email in billing address
- Forgot password flow does not work, getting email with a link but after clicking link it’s not working
- Send a different “thank you” email based on payment method
- Customer Email Address
- Adding time of order to Admin email for new order
- how to add custom reviews button in woocommerce order complete generated mail
- How to add coupon expiry date into the followup emails?
- Conditional email recipient based off Shipping Method [closed]
- Manual Woocommerce Complete order Emails
- Turkish Character Problem on mailing
- How to override email text New Customer Order?
- Woo-Commerce new order email no style attached
- WooCommerce – How to add a custom field to only a specific email template [closed]
- Insert a custom field as a second email address to a completed order in WooCommerce
- Woocommerce admin order email customize – remove product short description
- Is it possible to add custom fields to a WooCommerce attribute term? [closed]
- Woocommerce My Account Endpoint – how to get ID parameter from URL?
- How to add Woocomrce cart page shipping calculator to my country state list
- Button to update order status Woocommerce with WC Marketplace
- How we can edit variations on cart page? [closed]
- new WC_Order(); Coming Back Empty
- Is there any way to find which action/hook is fired?
- WooCommerce single products images doesn’t zoom on hover and doesn’t change clicking on gallery
- Place Order button in Checkout
- woocommerce – How Can I add author metadata for a product? [closed]
- Woocommerce – Want to move the product tabs below short description
- Where is the CSS class ui-sortable-handle for WC_Admin_Taxonomies added?
- WooCommerce: “account is already registered with your email address”
- Enter name and email on the Product page and keep the input data on the Checkout page
- Separeting product from post in search result
- Woocommerce: Same gross price for different tax rates [closed]
- add shoppy.gg to woocommerce instead of add to card [closed]
- WooCommerce plugin won’t let me access settings
- How to edit T&C checker text in Woocommerce checkout page? gettext?
- What is the reason for two classes storefront_woocommerce and storefront
- What’s the fastest way to import products with variations in WooCommerce (CSV, XML, …) [closed]
- Confirm Password on checkout page not working in woocommerce 3.0.1
- Woocommerce’s add_to_cart function returns false and doesn’t add anything to the cart [closed]
- WOOCOOMERCE: Run function before payment gateway (paying)
- How to check woocommerce single product tag
- Adding author option to [products] woocommerce shortcode
- Benefits over using object method over property from $product?
- Colour of selected radio button seems backwards in Twenty Seventeen + Woocommerce
- Customizing WooCommerce
- Woocommerce custom taxonomy filtering
- Woocommerce product tab is not showing probably
- Make e-Mail optional on Woocommerce sign up
- Sharing data between filters on a snippet (user specific) for Woocommerce
- How to add custom checkboxes from loop to WooCommerce product variation options?
- Create order actions from custom fields woocommerce
- Woocommerce doesn’t work with theme, header missing and css messed up
- Woocommerce Product Variation – Add Price Logic
- wc_mail in foreach loop is sending only the first email
- How to fix: “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.” after malware cleaning
- Can’t update WooCommerce payment method title
- Set Post Thumbnail to external URL
- How to add product variations for large number of products in WooCommerce?
- WooCommerce related products load random posts per page
- Woocommerce Languages Files
- How to adjust Related Page Thumb Sizes on single page?
- Adding more than one item to Woocommerce cart
- Woocommerce – get product in category with specific attribute
- How to edit the header banner in the search page in woocommerce?
- How can I display one product using WooCommerce
- How do I change the woocommerce product gallery to show all thumbnails instead of three at a time in a carousel?
- How to add a menu page for options in wordpress for user that has the role of vendor?
- Testimonials/Reviews for Products
- WooCommerce: Order Details Table > Add Product Meta
- Override function
- How to disable schema from Wocommerce? [closed]