Last active
May 18, 2018 22:10
-
-
Save thomasplevy/bc7a841a4b2c99fc18ad0a0f519fea24 to your computer and use it in GitHub Desktop.
Add a retry rule to the end of the default rules that waits 7 days and retries the recurring payment
This file contains 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 characters
<?php // don't copy this line to your functions.php file | |
/** | |
* Add a retry rule to the end of the default rules that waits 7 days and retries the recurring payment | |
* @param array $rules existing rules | |
* @return array | |
*/ | |
function my_custom_retry_rules( $rules ) { | |
$rules[] = array( | |
'delay' => WEEK_IN_SECONDS, | |
'status' => 'on-hold', | |
'notifications' => true, | |
); | |
return $rules; | |
} | |
add_filter( 'llms_order_automatic_retry_rules', 'my_custom_retry_rules' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment