Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Created December 3, 2021 08:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xlplugins/26e5372bd30cb846a00115bb76c7c718 to your computer and use it in GitHub Desktop.
Save xlplugins/26e5372bd30cb846a00115bb76c7c718 to your computer and use it in GitHub Desktop.
Disabled side cart of plugin Woocommerce Side Cart Premium By XootiX
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