You can disable individual emails at:
Dashboard > WooCommerce > Settings > Emails tab
“Manage” the relevant email, then uncheck “enable”.
add_filter( 'woocommerce_email_enabled_new_order', 'my_function' );
function my_function( $enabled ) {
Your code needs to return ‘yes’ when you want the email to fire, or ” (an empty string) when you don’t.
@lorro I’m not good with coding
thats why i followed that link
How do i execute this
add_filter( 'woocommerce_email_enabled_new_order', 'my_function' );
function my_function( $enabled ) {
-
This reply was modified 5 years, 2 months ago by
ezeelo2.
The forum is not a good way to do custom coding and debugging. Forum answers can only hope to point in the right direction. You may need a dev to help out.
Hi @ezeelo2,
Hopefully, you were able to get in touch with a developer for direct assistance. I could also suggest the WooCommerce Customization Experts, if you’re still in the search.
I’ll go ahead and mark this thread as resolved. Feel free to open a new thread if you have further questions.
Thanks.