There is no actions/filters to hook to. You need to override standard WC_Email_Customer_New_Account
class and implement your own logic. To do it you need to create your own class which will inherit that class and register it.
class WPSE8170_Email_Customer_New_Account extends WC_Email_Customer_New_Account {
function trigger( $user_id, $user_pass="", $password_generated = false ) {
// do what you need here and then call parent method
parent::trigger( $user_id, $user_pass, $password_generated );
}
}
Now you need to register this class:
add_filter( 'woocommerce_email_classes', 'wpse8170_update_email_classes' );
function wpse8170_update_email_classes( $emails ) {
$emails['WC_Email_Customer_New_Account'] = new WPSE8170_Email_Customer_New_Account();
return $emails;
}
Related Posts:
- WooCommerce: change display order of product short description and price [closed]
- How to remove action hook done in a plugin from functions.php in my theme?
- How to send an automated user ‘inactivity’ email?
- How do I successfully create a hook for an email override?
- Add my own function to existing WooCommerce hook
- WooCommerce – Overwrite action hook [closed]
- Can I remove WooCommerce main content hook?
- Help to change the text for new website notification (wpmu_welcome_notification)
- Setting up 2 SMTP accounts: 1 for wordpress and 1 for woocommerce
- Using hooks with extra parameters
- Change Password Confirmed Email Text
- WooCommerce order complete email logic
- WooCommerce single product page quantity description [closed]
- Execute JavaScript in WordPress Hook
- How to change the default mail when admin approuved an user?
- How to use a 3rd party library to send emails?
- Woocommerce table is missing a heading–can I add it by use of a hook?
- How to check if woocommerce_order_item_name is use in email?
- customer specific email attachment
- Change user role if it’s orders count more than
- Hook triggered twice in a Woocommerce single product page
- Is there a way to send HTML formatted emails with WordPress’ wp_mail() function?
- How to get WordPress’ hooks/actions run sequence?
- Where can I find a list of WordPress hooks?
- Is there a save_post hook for custom post types?
- Where is the right place to register/enqueue scripts & styles
- How to know what functions are hooked to an action/filter?
- How to hook update_post_meta and delete_post_meta?
- Are there any hooks that alter the 404 logic?
- Is there a hook that runs after a user logs in?
- Difference between do_action and add_action
- WP Cron Doesn’t Execute When Time Elapses
- Why do some hooks not work inside class context?
- Difference between after_setup_theme and init action hooks?
- get $post in init filter or action?
- Use wp init hook to call other hooks?
- How many times can I hook into the same action?
- How do I implement the WordPress Iris picker into my plugin on the front-end?
- How to intercept a 404 error
- Move excerpt meta box to above content editor
- Action hook for custom tax edit
- Trigger custom action when setting button pressed
- What is “all” in isset($wp_filter[‘all’])
- Whats worth using add_action when we can simply use add_filter?
- Is there a limit to hook priority?
- How do you access the Product Short Description in a WooCommerce email template? [closed]
- Please explain how these hooks work
- Add_action to wp_head via functions.php
- How to pass/get data to/from the WooCommerce data-product_variations object?
- Hook after image is uploaded and image sizes generated
- Is there a hook before the user is authenticated?
- Hook that fires when admin setting is saved
- add_action(‘wp_ajax_[action name]’, myfunction) problem
- WordPress Multisite: Adding actions to only one site
- What is the difference between update_post_meta and update_postmeta hooks?
- Hook ‘wp_enqueue_scripts’ priority has no effect
- Hook on trash post
- Hook *after* user password change?
- Auto-retrieve YouTube Image for Thumbnail?
- Which hook if user profile information is updated?
- Hooks for trashing, deleting, saving, restoring custom post type
- Is there a WordPress core & plugins update action hook?
- Hook into WordPress update?
- trigger save_post event programmatically
- Implementing advanced add_* function wrappers
- Adding onload to body
- My add_action (wp_footer, ‘method’) is not calling?
- Do WordPress Core Filenames Work as Hooks?
- What is the earliest possible hook for safely using `is_front_page`?
- switch_to_blog(): Load textdomain
- Filter hook before create order WooCommerce
- How to call a REST endpoint when a post is published?
- __NAMESPACE__ with register_activation_hook
- WooCommerce: Can’t use wc_get_products for custom REST API endpoints
- Can I hook inside another hook?
- Adding function directly vs using hook in function.php
- Remove Woocommerce product link
- Are hooks called synchronously?
- How to check if which hook triggered the call to a function?
- How can I send to multiple Contact Form 7 recipients based on form input? [closed]
- Hook into wp_head(); in a plugin
- Send data to 3rd party api with wp_remote_post on wp_login
- is it possible to get the hook name in add_action?
- wp_mail – Remove sitename from email subject
- Hook for URL Request
- How do I flush the rules after saving settings using the Settings API?
- Run javascript code after wp_login hook?
- Does anyone have a visual breakdown of core hooks and when they are fired?
- How to customize the WP admin default help contents
- What is the action hook for save media-form on gallery tab?
- What hook is executed just after wp_query has been executed?
- Hide gutenberg option blocks
- The ‘user_has_cap’ hook seems to take two page loads to trigger
- How to disable all WordPress emails modularly and programatically?
- How and where can we request new WordPress hooks to be added?
- Disable block from editor based on post type
- WordPress Admin Tooltip hooks
- How to get rid of the hover zoom in WooCommerce single products
- What’s the difference between WC() and $woocommerce
- Difference between hooks Plugin_loaded and admin_int?