• Resolved massimilianovolp

    (@massimilianovolp)


    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)
  • Hey there, @massimilianovolp! Thanks for contacting us.

    While we can’t provide support for code customization as per our support policy, we do our best to offer advice and direct you to appropriate resources.

    You can visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there too.

    I’m going to leave it open for a bit to see if anyone is able to chime in and help you out further.

    Please let us know if there’s anything else we can do to help or if you have any questions.

    Have a wonderful day!

Viewing 1 replies (of 1 total)
  • The topic ‘[Subscriptions] Dynamic subject for customer_payment_retry email’ is closed to new replies.