Skip to content

Instantly share code, notes, and snippets.

@thomasplevy
Last active May 18, 2018 22:10
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 thomasplevy/bc7a841a4b2c99fc18ad0a0f519fea24 to your computer and use it in GitHub Desktop.
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
<?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