Altering the payment retry rules
-
I am looking to change the payment retry rules.
I’m following the guide on https://woocommerce.com/document/subscriptions/develop/failed-payment-retry/I’ve found the file wp-content/plugins/woocommerce-subscriptions/includes/payment-retry/class-wcs-retry-rules.php which seems to be where they are specified.
How do I override the rules so they’re not reset every time I update the plugin? I am looking to retry after 24 hours and 7 days e.g.
$this->default_retry_rules = apply_filters( 'wcs_default_retry_rules', array(
array(
'retry_after_interval' => DAY_IN_SECONDS, // how long to wait before retrying
'email_template_customer' => '', // don't bother the customer yet
'email_template_admin' => 'WCS_Email_Payment_Retry',
'status_to_apply_to_order' => 'pending',
'status_to_apply_to_subscription' => 'on-hold',
),
array(
'retry_after_interval' => DAY_IN_SECONDS * 7,
'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',
),
) );
}
The topic ‘Altering the payment retry rules’ is closed to new replies.