S
S
sanya_mil2018-04-22 22:30:36
Email
sanya_mil, 2018-04-22 22:30:36

How to send an email to the specified email when adding a product to the site (WP + WooCommerce)?

Hello!
I must say right away that I am new to WordPress and its plugins.
In the "Products" tab there is an item "add a new product", in that window you need to create one more field, and this field will be responsible for sending a letter to the specified email. And I need to make sure that after the publication of the product on the site, i.e. after clicking on the "Publish" button, a notification was sent to the mail (entered by me in this field).
Can you please tell me how to implement this using WooCommerce? I would be grateful for any help!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
aarty20, 2018-04-26
@aarty20

How to stop being a newbie: WP has a 'save_post' hook, so you can attach the function of sending emails to it.
That is, when you save a post, you check the taxonomy (for WooCommerce it is products), if a product was saved from the taxonomy of products, and not posts and whatever, you send an email whatever you want. :)

O
Orkhan Hasanli, 2018-04-26
@azerphoenix

Hello!
Ready plugin - https://wordpress.org/plugins/bnfw/
But if I'm not mistaken, only the premium version of this plugin supports sending emails for custom post types, including WC

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question