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
- Sending all emails using SMTP
- Can’t set proper WooCommerce language translation [closed]
- How to authenticate custom API endpoint in WooCommerce [closed]
- Function to Set Product type in Woocommerce [closed]
- Updating WooCommerce variable product stock issue
- Is there a plugin that allows a user of your site to get an email from you with an attachment?
- Override core woocommerce class
- WooCommerce – Where is functions.php?
- Woocommerce Shipping module available only for type of products [closed]
- WooCommerce – Adding Custom Order Without No Product [closed]
- A very basic question – how to properly use wp_mail() in a plugin
- Setting Custom Email From name and email address in wp_email()
- Manually add order item with fixed product_id in WooCommerce
- Sending email from inside a plugin using PHP PEAR
- Can’t send mails using contact plugin [closed]
- WooCommerce shop page orderby [closed]
- WordPress Registration Email by Role
- WooCommerce Custom Product to checkout
- Reduce Drop down Menu Width in WordPress
- How to stop activating a plugin and show admin notice when dependent plugins minimum version is not met
- How to modify WCMP Rest API response?
- Woocommerce dependent plugin
- Get sent emails without email logs
- I want to disable Cash on delivery based on product tag in woocommerce Checkout Page [closed]
- Is there a way to create custom product templates based on category on WooCommerce?
- CampaignMonitor for WooCommerce – Move subscribe button [closed]
- Pre booking doesn’t work with custom bootstrap modul in woocommerce [closed]
- Custom Pages for Woocommerce Product-Category Pages
- Woocommerce Minimum Price for a Composite Product to add in cart
- Redirect to another page using contact form 7? [closed]
- Is there a way to get plugins and themes not built for multisite to work on a network subsite?
- Add item to the woocommerce dashboard menu from a plugin
- SMTP Error: Could not authenticate [closed]
- Get orders of a specific customer woocommerce
- wc_get_template new template does not showing up
- WordPress: Add custom add_filter for custom functions
- Sending HTML email containing custom fields to site users from WordPress
- Woocommerce – WordPress Roles & Capabilities
- Custom template for all woo commerce categories
- Search users with custom meta data
- Is it possible to instantiate a new WC_Cart?
- How to change layout of shop page in wordpress? [closed]
- How can I add user profile fields to my mailpress mailout
- Can Postie be used to submit podcasts via email?
- How to get custom minimum price in Woocommerce
- Edit all $wp_scripts at once to $in_footer = false
- Restrict posts to customers with complete WooCommerce orders only
- How to makes changes on the shop/category/tag pages but not on the product pages in woocommerce?
- product available stock day by day
- woocommerce – adding wrapper around custom made woocommerce form fields
- How can i solve php upgrade problem
- woocommerce: Customize email with item total count
- Save order without sending the invoice / order details woocommerce [closed]
- How to Upload images to a custom folder in upload folder using media uploader
- I have English words in Kurdish pages
- Make modification of add_to_cart button specific to single page
- How to get the checkout form data from checkout page when place-order button is clicked
- Product Page loads terribly slow when product gallery images are added
- How to make WooCommerce multiple filter with custom meta fields
- One WooCommerce Store to multi distributor sites
- Google Maps for Woocommerce Checkout
- category page multiple products add to cart any plugin available for woocommerce
- “Enable Media Replace” plugin does not update serialized object in WPMeta
- Is there a request for products plugin for WooCommerce
- Meta Key array building with multiple input values from fields
- Only return taxonomies that are linked to a category & product
- How Can I display Specific User Pages?
- Configuring default woo commerce login with modal popup
- Custom plugin issue – Notice: Trying to get property of non-object in
- fetch price from different table woocommerce
- Cannot save a custom meta field in quick edit
- Saving data only when payment is successful
- Template conflict with WC Payment Method
- Plugin sending emails to external addresses, not internal
- Cron job emails blank
- Change value of Points earned in product data
- Not getting result using ajax on wordpress
- How to allow customers to input a text as a product variation *and* charge per character?
- How do I replace the e-mail form to functional e-mail subscription? [closed]
- WooCommerce doesn’t show UK countries in the shipping options [closed]
- WooCommerce custom query and paging: Not Found error
- WooCommerce & WooCommerce Shopee Intergration
- Woocommerce Emails not being sent [closed]
- WP can’t send newsletters
- Translate text for empty product
- ‘Active lotteries’ only custom query for woocommerce lottery plugin and elementor
- How to create a “plugin” or “block” that can manipulate WordPress DOM in frontend?
- I want to set a different banner for each product in the woocommerce plugin on my wordpress site
- Template selector for woocommerce product
- How to add product thumbnail on orders list on backend?
- Plugin Icon does not work correctly
- I want create woocommerec match products columns
- Free multi dealer rental cars (sign up) [closed]