Sending request attribute on order completed email

Just wondering how I would implement one of the request attribute on a order completed email.

I have successfully shown one of the attribute on Offer received email by typing
%request.date1%
However, this dose not work on order completed email.

Yes, the %request% token is not available in the order email because orders are not always related to requests, e.g. a new order can be created for a listing instead of request. When you create a new email in HivePress/Emails, please save changes and a list of available tokens will appear in the Description section.

Are there any method where I can implement custom request attribute in order completed email then?

Unfortunately there’s no easy way to do this because these customer-side order emails are entirely implemented by WooCommerce, this would require code customizations. Please try using the Offer Received and other HivePress emails for this purpose, they have requests and listings in their context.

What are the HivePress emails that allows me to send %request% attribute to vendors?
I’ve tried request received but that only sends when a customer requests to a specific vendor.

If that doesn’t exist, then can I change email recipient?

I found this snippet, but didn’t know how to apply this into request and change the example@example.com part into an arbitrary vendor.

Thanks

<?php
add_filter(
	'hivepress/v1/emails/listing_submit',
	function( $email ) {
		$email['recipient'] = 'example@example.com',

		return $email;
	},
  1000
);

All the offer- and request- related email events include the %request% token, for example Offer Received, Request Approved, etc. Other HivePress emails would require a code snippet, e.g. it may be possible for HivePress order-specific emails but for WooCommerce emails this would require advanced code changes.

I saw that offer revived, Request Approved email includes %request%. but that only sends to the user.

Or are there some code snippet that allows me to change the recipient of the email.

This token should be also available in the Offer Approved, Offer Received emails, the first one is sent to the vendor but the second one is sent to the request author. Please try using any of these available email notifications related to requests. It may be also possible for order-related emails, but for WooCommerce-specific emails this requires advanced customizations.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.