Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woogists/be588ba8766179e722ae3a9f1c38bc0d to your computer and use it in GitHub Desktop.
Save woogists/be588ba8766179e722ae3a9f1c38bc0d to your computer and use it in GitHub Desktop.
WooCommerce Subscriptions (Preserve Billing Schedule)
<?php
/*
* By default, WooCommerce Subscriptions will calculate the next payment date for a subscription from the time of the last payment.
* This snippet changes it to calculate the next payment date from the scheduled payment date, not the time the payment was actually processed.
*/
add_filter( 'wcs_calculate_next_payment_from_last_payment', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment