Created
January 17, 2024 19:39
-
-
Save MaximilianoRicoTabo/cb5ee9d31eb9eca44d488891d34550f9 to your computer and use it in GitHub Desktop.
Let Core send emails instead of doing through MMPU.
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
<?php | |
/** | |
* Let Core send emails instead of doing through MMPU. | |
* | |
* link: TBD | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
/** | |
* Disable MMPU emails. | |
*/ | |
function pmpro_disable_mmpu_emails() { | |
remove_action( 'pmpro_after_all_checkouts', 'pmprommpu_send_checkout_emails' ); | |
remove_filter( 'pmpro_send_checkout_emails', 'pmprommpu_stop_default_checkout_emails' ); | |
} | |
add_action( 'init', 'pmpro_disable_mmpu_emails' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment