[Subscriptions] Dynamic subject for customer_payment_retry email
-
I need to programmatically change the subject of the email sent to the customer with the id “customer_payment_retry” and the body of the email.
For the subject I’m using the filter “woocommerce_subscriptions_email_subject_customer_retry” but it doesn’t seem to work, here’s the code I’m using:
function change_email_subject_customer_retry( $subject, $order ) { $count_attempts=\WCS_Retry_Manager::store()->get_retry_count_for_order( $order->get_id() ); return $subject . ' attempt #' . $count_attempts; } add_filter('woocommerce_subscriptions_email_subject_customer_retry', 'change_email_subject_customer_retry', 11, 2);
I added this code in the child-theme “<child-theme-folder>/woocommerce/emails/customer-payment-retry.php”
What am I doing wrong?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Subscriptions] Dynamic subject for customer_payment_retry email’ is closed to new replies.