Skip to content

Add Payment Link to WooCommerce Subscription Renewal Email

I’m currently working for a client that manages subscriptions with WordPress and WooCommerce (in particular using the WooCommerce Subscription plugin). Since most payment options they support are actually manual payments like bank transfer (BACS), we had to figure out a way to add a payment link to the WooCommerce subscription renewal email.

In order to accept manual renewals enable it in the WooCommerce Subscription settings (the documentation can be found here: WooCommerce Subscription Manual Renewal).

The template for the renewal email is called “Customer Renewal Invoice” and is usually only sent to the Customer.

Please keep in mind that if you’re working in a local or staging environment you need to specifically enable automatic payments (see: Enabling Automatic Payments for Staging Sites).

To add a payment link to the Customer Renewal Invoice we need to add a custom template in our theme directory.

Create a new file in /wp-content/themes/{your-theme}/woocommerce/emails/  and name it customer-renewal-invoice.php

Paste the following content into the file:

At the position of the renewal email where you want to have the payment link add the following two lines of code:

Your final  customer-renewal-invoice.php should look similar to this:

And this is how you add a payment link to the WooCommerce subscription renewal email.

Happy coding!

Published inProgrammingWooCommerce

One Comment

  1. Paul

    Thank you, the snippet for the payment link that I found here is very useful!

Leave a Reply

Your email address will not be published.