Skip to content

Instantly share code, notes, and snippets.

@thenbrent
Last active November 16, 2016 00:06
Show Gist options
  • Select an option

  • Save thenbrent/7a99fe32fd834c1a98fa46d74700367a to your computer and use it in GitHub Desktop.

Select an option

Save thenbrent/7a99fe32fd834c1a98fa46d74700367a to your computer and use it in GitHub Desktop.

Revisions

  1. Brent Shepherd revised this gist Nov 16, 2016. 2 changed files with 1 addition and 30 deletions.
    1 change: 1 addition & 0 deletions wcs-calculate-next-payment-from-last-payment.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    This gist has been migrated to a repo [here](https://github.com/Prospress/woocommerce-subscriptions-preserve-billing-schedule).
    30 changes: 0 additions & 30 deletions wcs-calculate-next-payment-from-last-payment.php
    Original file line number Diff line number Diff line change
    @@ -1,30 +0,0 @@
    <?php
    /**
    * Plugin Name: WooCommerce Subscriptions - Preserve Billing Schedule
    * Plugin URI:
    * Description: By default, WooCommerce Subscriptions will calculate the next payment date for a subscription from the time of the last payment. This plugin changes it to preserve the original schedule and calculate the next payment date from the scheduled payment date, not the time the payment was actually processed.
    * Author: Prospress Inc.
    * Author URI: http://prospress.com/
    * Version: 1.0
    *
    * Copyright 2016 Prospress, Inc. (email : [email protected])
    *
    * This program is free software: you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation, either version 3 of the License, or
    * (at your option) any later version.
    *
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    * GNU General Public License for more details.
    *
    * You should have received a copy of the GNU General Public License
    * along with this program. If not, see <http://www.gnu.org/licenses/>.
    *
    * @package WooCommerce Subscriptions
    * @author Prospress Inc.
    * @since 1.0
    */

    add_filter( 'wcs_calculate_next_payment_from_last_payment', '__return_false' );
  2. Brent Shepherd created this gist Sep 28, 2016.
    30 changes: 30 additions & 0 deletions wcs-calculate-next-payment-from-last-payment.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    <?php
    /**
    * Plugin Name: WooCommerce Subscriptions - Preserve Billing Schedule
    * Plugin URI:
    * Description: By default, WooCommerce Subscriptions will calculate the next payment date for a subscription from the time of the last payment. This plugin changes it to preserve the original schedule and calculate the next payment date from the scheduled payment date, not the time the payment was actually processed.
    * Author: Prospress Inc.
    * Author URI: http://prospress.com/
    * Version: 1.0
    *
    * Copyright 2016 Prospress, Inc. (email : [email protected])
    *
    * This program is free software: you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation, either version 3 of the License, or
    * (at your option) any later version.
    *
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    * GNU General Public License for more details.
    *
    * You should have received a copy of the GNU General Public License
    * along with this program. If not, see <http://www.gnu.org/licenses/>.
    *
    * @package WooCommerce Subscriptions
    * @author Prospress Inc.
    * @since 1.0
    */

    add_filter( 'wcs_calculate_next_payment_from_last_payment', '__return_false' );