You can do it very easily by using his mail class. you can extend that class as well. Here is the code which should work with your class code. if it did not work than you need to extend the woocommerce email class same like you did for your custom payment gateway.
$mailer = WC()->mailer();
$mails = $mailer->get_emails();
if ( ! empty( $mails ) ) {
foreach ( $mails as $mail ) {
if ( $mail->id == 'new_order' || $mail->id == 'customer_processing_order' ){
$mail->trigger( $order->id );
}
}
}
Related Posts:
- Woocommerce email template customization [closed]
- How to send an automated email to the customers when product is added woocommerce
- WordPress eMails not working
- Get value from an input field and pass into update_meta_data as $meta_value
- additional fields based on the quantity of products selected
- Disable email notification after change of password
- Hide prices and checkout functionality in woocommerce
- How to Display Product specific to a category with WooCommerce Plugin? [closed]
- Woocommerce Add Variation Product to Cart from custom link [closed]
- Woocommerce hook after creating order? [closed]
- How do I get WooCommerce to automatically recreate pages? [closed]
- Woocommerce override mini-cart.php not working [closed]
- WooCommerce – How to Add a Custom Field to Cart Items and Cart Totals [closed]
- wp_mail and BCC headers
- Sending all emails using SMTP
- How to get current post ID in Contact Form 7 wpcf7_before_send_mail hook action
- Send email when a new post is published [closed]
- Can’t set proper WooCommerce language translation [closed]
- Email Notifications of new posts to users – suggestions [closed]
- WooCommerce – Load Templates From Plugin For All Template Files
- How to authenticate custom API endpoint in WooCommerce [closed]
- WP WC CLI – WooCommerce setup store with wp-cli [closed]
- WooCommerce ‘all’ orders no longer being displayed – how may I debug/fix [closed]
- Create WooCommerce Product Category Programmatically
- Changing Woocommerce Product Description [closed]
- Function to Set Product type in Woocommerce [closed]
- WooCommerce create new product and add to cart on form submit
- User profiles and object associations
- Updating WooCommerce variable product stock issue
- How to add usermeta to “Notice of Email Change” email message
- WooCommerce Always Include Shipping Information in Checkout [closed]
- Notify commenters about new replies
- Add Products to user’s ID Woocommerce
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- How to set value/term of a Woocommerce attribute text field in admin panel?
- Send batch of posts as HTML Email?
- Woocommerce different URL for every table placed in the restaurant
- Disable Admin Bar Render on Plugin Page
- Is there a plugin that allows a user of your site to get an email from you with an attachment?
- how to redirect to my template
- WooCommerce Dynamic Cart Pricing
- How does WooCommerce display a custom comment_type in Comment Admin?
- How to add product images using script?
- Woocommerce cart is a non-object inside `admin_post` action [closed]
- $woocommerce->cart is null inside WordPress Rest API
- Add CSS class to add-to-cart button, Woocommerce [closed]
- Get product attribute for Simple product in WooCommerce
- Plugin for Sending Email to Readers about New Posts? (besides “Subscribe2 “)
- How to bulk send emails
- Server-side subscribe by email?
- Custom Shipping method not showing in checkout
- Remove action from woocommerce barcode plugin [closed]
- WP Mail SMTP: What do the SSL/TLS options mean? [closed]
- Show “Local Pickup” shipping method only for specific Woocommerce product categories [closed]
- Override core woocommerce class
- WooCommerce – Where is functions.php?
- Over write plugin templates
- Woocommerce Shipping module available only for type of products [closed]
- WP Crowdfunding customization [closed]
- WooCommerce – Adding Custom Order Without No Product [closed]
- Woocommerce custom shared taxonomy
- wp_mail() is not working on server
- Storing a password for use with a WordPress plugin
- How to prevent action in ajax request, when in admin side?
- Invalid shipping method, WooCommerce [closed]
- A very basic question – how to properly use wp_mail() in a plugin
- WordPress plugin for mail subscriptions [closed]
- Is there a plugin to record querystring parameters for a page (for customer tracking)? [closed]
- Sort products without thumbnail in WooCommerce shop page
- Create or Update thousands of woocommerce products via PHP
- Storing Email Account Passwords for SMTP Mailing for a WordPress Plugin
- action-scheduler vs wp-background-processing
- Automatically adding category filter based on search string
- Can’t create term for product attribute
- Easy Digital Downloads (EDD) – Purchase Receipt emails couldn’t be logged
- Add multiple attributes to product from php
- XML sitemap over product variations
- WordPress sending emails continuously. How to stop it?
- wp_mail attachment not working
- block countries from shipping to them in WooCommerce [closed]
- Woocommerce sidebar not loading in theme
- Is it possible to set up multistore in Woocommerce? [closed]
- Setting Custom Email From name and email address in wp_email()
- Make specific products accessible only to a user role in WooCommerce
- How to remove the woocommerce_checkout_process action hook in woocommerce if particular project in cart [closed]
- How to edit Image layout in single product page in woocommerce on wordpress?
- How To Hide Filters On Specific Categories with WooCommerce Products Filter(WOOF)
- Woocommerce – Display active variation product price [closed]
- How to get subscription key or id using Woocommerce Subscriptions [closed]
- how to incude logo in contcat form 7 email [closed]
- Check if email address exists front end with AJAX in a plugin
- Need Old Version of plugins
- WooCommerce E-Check payment gateway disappeared when site switched to multi-site
- Manually add order item with fixed product_id in WooCommerce
- How can I display a contact form for out of stock products in WooCommerce?
- Sending email from inside a plugin using PHP PEAR
- Remove specific product from shop in woocommerce [closed]
- woocommerce_order_status_completed action hook not working [closed]
- How to update billing_email when user_email is updated [closed]
- Can’t send mails using contact plugin [closed]