Skip to content

Instantly share code, notes, and snippets.

@MaximilianoRicoTabo
Created January 17, 2024 19:39
Show Gist options
  • Save MaximilianoRicoTabo/cb5ee9d31eb9eca44d488891d34550f9 to your computer and use it in GitHub Desktop.
Save MaximilianoRicoTabo/cb5ee9d31eb9eca44d488891d34550f9 to your computer and use it in GitHub Desktop.
Let Core send emails instead of doing through MMPU.
<?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