Created
November 25, 2022 07:37
-
-
Save xlplugins/09436ca2d59537e3d605f89359a3a7f5 to your computer and use it in GitHub Desktop.
If checkout overridden by store checkout funnel
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 | |
function if_funnel_has_store_checkout_set() { | |
if ( ! class_exists( 'WFFN_Common' ) || ! method_exists( 'WFFN_Common', 'get_store_checkout_id' ) || 0 === WFFN_Common::get_store_checkout_id() ) { | |
return false; | |
} | |
$funnel = new WFFN_Funnel( WFFN_Common::get_store_checkout_id() ); | |
/** | |
* Check if this is a valid funnel and has native checkout | |
*/ | |
if ( ! wffn_is_valid_funnel( $funnel ) ) { | |
return false; | |
} | |
/** | |
* if native checkout set in store chekout funnel | |
*/ | |
if ( true === $funnel->is_funnel_has_native_checkout() ) { | |
return false; | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment