Last active
September 8, 2020 14:02
-
-
Save thenbrent/34656a3c97ed2003166b to your computer and use it in GitHub Desktop.
Revisions
-
Brent Shepherd revised this gist
Jan 1, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,7 +30,7 @@ /** * Apply our own set of retry rules. */ function wcsfptrr_retry_rules( $default_retry_rules_array ) { return array( array( 'retry_after_interval' => 60, -
Brent Shepherd revised this gist
Jan 1, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,7 +30,7 @@ /** * Apply our own set of retry rules. */ function wcsfptrr_retry_rules( $default_retry_rules ) { return array( array( 'retry_after_interval' => 60, -
Brent Shepherd revised this gist
Jan 1, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -69,4 +69,4 @@ function wcsfptrr_retry_rules() { ), ); } add_filter( 'wcs_default_retry_rules', 'wcsfptrr_retry_rules' ); -
Brent Shepherd revised this gist
Mar 29, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -69,4 +69,4 @@ function wcsfptrr_retry_rules() { ), ); } add_filter( 'woocommerce_subscriptions_retry_rules', 'wcsfptrr_retry_rules' ); -
Brent Shepherd created this gist
Mar 29, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,72 @@ <?php /** * Plugin Name: WooCommerce Subscriptions Failed Payment Retry Rules for Testing * Plugin URI: * Description: Replace the default WooCommerce Subscriptions failed payment retry rules with rules that run every few minutes (not days) and always send dunning emails to help with testing. * 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 */ /** * Apply our own set of retry rules. */ function wcsfptrr_retry_rules() { return array( array( 'retry_after_interval' => 60, 'email_template_customer' => 'WCS_Email_Customer_Payment_Retry', 'email_template_admin' => 'WCS_Email_Payment_Retry', 'status_to_apply_to_order' => 'pending', 'status_to_apply_to_subscription' => 'on-hold', ), array( 'retry_after_interval' => 120, 'email_template_customer' => 'WCS_Email_Customer_Payment_Retry', 'email_template_admin' => 'WCS_Email_Payment_Retry', 'status_to_apply_to_order' => 'pending', 'status_to_apply_to_subscription' => 'on-hold', ), array( 'retry_after_interval' => 180, 'email_template_customer' => 'WCS_Email_Customer_Payment_Retry', 'email_template_admin' => 'WCS_Email_Payment_Retry', 'status_to_apply_to_order' => 'pending', 'status_to_apply_to_subscription' => 'on-hold', ), array( 'retry_after_interval' => 240, 'email_template_customer' => 'WCS_Email_Customer_Payment_Retry', 'email_template_admin' => 'WCS_Email_Payment_Retry', 'status_to_apply_to_order' => 'pending', 'status_to_apply_to_subscription' => 'on-hold', ), array( 'retry_after_interval' => 300, 'email_template_customer' => 'WCS_Email_Customer_Payment_Retry', 'email_template_admin' => 'WCS_Email_Payment_Retry', 'status_to_apply_to_order' => 'pending', 'status_to_apply_to_subscription' => 'on-hold', ), ); } add_filter( 'woocommerce_subscriptions_retry_rules', 'wcsffprr_retry_rules' );