Public Ticket #3757134

Trigger email after product has been sent for review

Closed
Comments
56 Tickets 59
Anthony O Connell started the conversation 2 years ago on November 4, 2024 at 7:03pm

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


2,762
KingsPlugins replied 2 years ago on November 10, 2024 at 1:45pm

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

1

Sign In