Created
December 3, 2021 08:48
-
-
Save xlplugins/26e5372bd30cb846a00115bb76c7c718 to your computer and use it in GitHub Desktop.
Disabled side cart of plugin Woocommerce Side Cart Premium By XootiX
This file contains 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
class Woofunnel_Disable_Side_Cart { | |
public function __construct() { | |
add_action( 'wfacp_after_checkout_page_found', [ $this, 'action' ] ); | |
add_action( 'wp', [ $this, 'remove_offer_action' ] ); | |
} | |
public function remove_offer_action() { | |
global $post; | |
if ( ! class_exists( 'WFOCU_Common' ) || is_null( $post ) || $post->post_type !== WFOCU_Common::get_offer_post_type_slug() ) { | |
return; | |
} | |
$this->action(); | |
} | |
public function action() { | |
add_filter( 'xoo_wsc_is_sidecart_page', '__return_false' ); | |
} | |
} | |
new Woofunnel_Disable_Side_Cart(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment