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 WordPress core & plugins update action hook?
- trigger save_post event programmatically
- is it possible to get the hook name in add_action?
- How to disable all WordPress emails modularly and programatically?
- WooCommerce: How to display item meta data in email confirmation using woocommerce_order_item_meta_end
- How to properly test a method that is called by an action hook
- How can I do customizations on login, registration and password recovery forms?
- How to Remove a Filter from the Admin List Table?
- Custom form action hook
- Woocommerce, recognize the loop of related products
- display available size on hover, in woocommerce shop page [closed]
- wp_redirect() not working on form submission with init hook
- Over write plugin templates
- How to prevent action in ajax request, when in admin side?
- How To Change The Html of Products filtration sidebar in Woocommerce?
- Admin Hook at the Login Page
- Which Hook? Hide attachments from specific post types in media library
- Custom action on login and “remember me”
- Woocommerce email template customization [closed]
- How to hook into Add New Member in BuddyPress
- Using wp_editor tinyMCE in metabox cause form alert on leaving page
- How do I hide the purchase note in the WooCommerce ‘order completed’ email?
- Woocommerce: Prevent sending of email when order is “Completed”
- Edit WooCommerce product content based on category
- Hook when new CPT published AND postmeta inserted
- Need to check is_archive during init
- When WP_CLI runs WordPress from the command line, are hooks called?
- Query categories that have a description
- Trying to run a compile command while saving post
- Add default user field to WooCommerce checkout [closed]
- Action hook for custom tax edit
- wp cron job fires at every second or so, if callback is wrapped with DOING_CRON check it never fires at all
- I don’t understand how add_action and do_action work in tandem. The former executes the code already…what is do_action for?
- Remove an action by extending class and replacing it
- Insert HTML in post, below nav bar but above content?
- Convert Gravity Form Entry Date on Export
- Hook Adding content after title
- Fatal error: Call to a member function get_queried_object_id()
- “admin_enqueue_scripts” hook or $_GET[‘page’]?
- Send email notifications to a defined email address depending if a product in order has a specific TAG [closed]
- How to add content to suscriptor dashboard frontend?
- Redirect no product url’s to static url
- Add PHP code to header section from plugin
- How to change a WordPress term’s slug before saving
- dynamic add_action according to child pages (for homepage control)
- Conditional action hook
- Remove action in a parent theme from the child theme
- Remove action within a class in a parent theme’s includes folder from the child theme
- Action hook save_post for newly created posts – $post object data is all empty
- What hook should I use that will fire whenever I open a post for editing in the WP back-end?
- How to access page variable inside action hook
- Can not using get_header() cause trouble (later on)?
- Is there a author_update action?
- How to get product information using hooks?
- manage_shop_order_posts_custom_column() hook is Not working In Functions.php file in my WordPress active theme
- Print additional fields in wp_new_user_notification_email_admin
- Missing variable options on add to cart form
- remove_action not working for a function
- How can i add product Accessories from front-end using custom php form?
- Is there no concise way, a library maybe, to help with unhooking class functions and so on?
- How to change lost password email text using custom plugin wordpress?
- Debug a WP install: how to find which functions write post updates during a process (a woocommerce checkout in my case)
- What hook should I use to add post meta data with on update?
- How do I remove an action hook inside a class that is called by another class?
- Problem with call_user_func_array front end
- How to I prevent WordPress from switching external HTTP links to HTTPS?
- Stylesheet is getting removed/deregistered automatically
- how to add custom reviews button in woocommerce order complete generated mail
- How to add coupon expiry date into the followup emails?
- Using actions, hooks and filters in a non-WordPress page
- Hook into create_category
- Trouble adding data to options table
- How to hook into publish_posttype?
- $GLOBALS & global doesn’t work [closed]
- Turkish Character Problem on mailing
- Hooks not working on live server
- Why does WordPress not send the user the email to add a password?
- How can I get the ID before after_setup_theme?
- Hook on opening a media/document