Created
May 19, 2026 06:17
-
-
Save xlplugins/073b6541bb016971d37656793179cee2 to your computer and use it in GitHub Desktop.
Disable new user creation email during the checkout if cart contain sublium subscription
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
| add_filter( 'woocommerce_email_enabled_customer_new_account', function( $enabled, $object ) { | |
| // Check if we're in a checkout/order processing context with a Sublium plan in cart | |
| if ( WC()->cart && \Sublium_WCS\Includes\Main\Cart::get_instance()->cart_contains_plan() ) { | |
| return false; | |
| } | |
| return $enabled; | |
| }, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment