At present, when a new vendor creates a product, it is sent for review to admin. This is great but is it possible, when a vendor hits the 'Send for Review' in their product dashboard, that this triggers an email where we send them a quick note of what is needed for a product to get published to the store?
We did a similar php snippet previously for when vendors send me a message via the dashboard and something like this again would be great.
This would help ensure all vendors follow instructions that I have set out.
Hi guys.
At present, when a new vendor creates a product, it is sent for review to admin. This is great but is it possible, when a vendor hits the 'Send for Review' in their product dashboard, that this triggers an email where we send them a quick note of what is needed for a product to get published to the store?
We did a similar php snippet previously for when vendors send me a message via the dashboard and something like this again would be great.
This would help ensure all vendors follow instructions that I have set out.
Thanks
Hello Anthony,
I believe you can achieve that using the following code snippet:
add_action('marketking_new_product_requires_approval', function($product_id){ $vendor_id = get_current_user_id(); if (marketking()->is_vendor_team_member()){ $vendor_id = marketking()->get_team_member_parent(); } // send email $email = marketking()->get_vendor_email($vendor_id); $message = 'Your message here'; do_action('marketking_new_message', $email, $message, $vendor_id, ''); }, 10, 1);This should trigger the email when a product that requires approval is created.
If that doesn't work for you, it would help if you can please share the other snippet you mentioned that already works. I cannot seem to find it.
Kind regards,
Stefan
Hi Stefan.
That snippet works great.
Thanks very much 🙌
Thanks.
Works like a charm 🙌