Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This code snippet modifies the "Review Reminder" WooCommerce Email.
- *
- * @param bool $skip Whether the email should be skipped for the provided order
- * @param \WC_Order $order The WooCommerce Order object
- *
- * @return bool - true if the Review Reminder email should be skipped, false otherwise.
- */
- add_filter('site-reviews-notifications/product/reminder/skip', function ($skip, $order) {
- if (get_post_meta($order->get_id(), 'user_gave_consent', true)) {
- return true; // Skip if user did not give consent
- }
- $return $skip;
- }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment