Created
November 27, 2015 21:24
-
-
Save strangerstudios/a9534e7b5c62ac7950f7 to your computer and use it in GitHub Desktop.
Disable PMPro Cron Jobs for Expirations, Expiration Warnings, and Expiring Credit Card Warnings
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 characters
/* | |
Note the commented out lines below. This is setup now to only disable the expiration warnings email, | |
but if you uncomment the other lines it will disable those scripts. | |
Add this code to your active theme's functions.php or a custom plugin. | |
*/ | |
function init_disable_pmpro_crons() | |
{ | |
//remove_action("pmpro_cron_expire_memberships", "pmpro_cron_expire_memberships"); | |
remove_action("pmpro_cron_expiration_warnings", "pmpro_cron_expiration_warnings"); | |
//remove_action("pmpro_cron_credit_card_expiring_warnings", "pmpro_cron_credit_card_expiring_warnings"); | |
} | |
add_action('init', 'init_disable_pmpro_crons'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.