Created
August 16, 2021 14:27
-
-
Save dparker1005/02a562f77697979c163e2e8bfac3f597 to your computer and use it in GitHub Desktop.
Fetch next payment dates from payment gateways during the expiration warnings cron. This also affects emails sent by the PMPro Recurring Emails Add On.
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 | |
/** | |
* Fetch next payment dates from payment gateways during the expiration warnings cron. This | |
* also affects emails sent by the PMPro Recurring Emails Add On. | |
*/ | |
function my_pmpro_cron_expiration_warnings_filter_next_payments() { | |
add_filter('pmpro_next_payment', array('PMProGateway_paypalexpress', 'pmpro_next_payment'), 10, 3); | |
add_filter('pmpro_next_payment', array('PMProGateway_braintree', 'pmpro_next_payment'), 10, 3); | |
} | |
add_action( 'pmpro_cron_expiration_warnings', 'my_pmpro_cron_expiration_warnings_filter_next_payments', 5 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment