Developer Guide to Change Subscriptions to Manual Payments

If you need to switch a large number of subscriptions to use manual renewals, and you are proficient with PHP and/or MySQL, you can also programmatically change a subscription’s payment method to be manual.

Change a Subscription to Manual Payments via Database

↑ Back to top

To change a customer’s subscription via the database:

  1. Find the ID of the subscription – this displays on the Manage Subscription table next to the subscription.
  2. Open MySQL editor (like PhpMyAdmin).
  3. Search the wp_postmeta table for a row where the post_ID is the ID found in step 1 and the meta_key is '_requires_manual_renewal'.
  4. If a row is found, change the meta_value for that row to true.
  5. If a row was not found in step 3, insert a row into the wp_postmeta table where the post_ID is the ID found in step 1, the meta_key is '_requires_manual_renewal' and the meta_value is true.

You can also bulk insert or update this meta data via a custom MySQL query for a batch of subscription IDs.

Change a Subscription to Manual Payments via PHP

↑ Back to top

To change a customer’s subscription using PHP:

  1. Find the ID of the subscription – this displays on the Manage Subscription table next to the subscription.
  2. In you PHP code, instantiate an instance of that subscription using wcs_get_subscription( $subscription_id )
  3. Call update_manual() on the subscription instance with a value of true to set the subscription to require manual renewals.
Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.