Created
April 7, 2025 14:23
-
-
Save xlplugins/110b8c71145082703a415b35d23a8286 to your computer and use it in GitHub Desktop.
Funnelkit Checkout: Compatability with Ecomus Addons by Drfuri
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
class WFACP_Ecomus_Addons { | |
public function __construct() { | |
add_action( 'wfacp_after_checkout_page_found', [ $this, 'remove_action' ] ); | |
add_action( 'wfacp_before_process_checkout_template_loader', [ $this, 'remove_action' ] ); | |
add_action( 'wfacp_internal_css', [ $this, 'add_css' ] ); | |
} | |
public function remove_action() { | |
if ( ! class_exists( 'Ecomus\WooCommerce\Checkout' ) ) { | |
return; | |
} | |
WFACP_Common::remove_actions( 'woocommerce_before_checkout_form', 'Ecomus\WooCommerce\Checkout', 'before_login_form' ); | |
WFACP_Common::remove_actions( 'woocommerce_before_checkout_form', 'Ecomus\WooCommerce\Checkout', 'login_form' ); | |
WFACP_Common::remove_actions( 'woocommerce_before_checkout_form', 'Ecomus\WooCommerce\Checkout', 'coupon_form' ); | |
WFACP_Common::remove_actions( 'woocommerce_before_checkout_form', 'Ecomus\WooCommerce\Checkout', 'after_login_form' ); | |
WFACP_Common::remove_actions( 'woocommerce_checkout_coupon_message', 'Ecomus\WooCommerce\Checkout', 'coupon_form_name' ); | |
WFACP_Common::remove_actions( 'woocommerce_cart_item_name', 'Ecomus\WooCommerce\General', 'review_product_name_html' ); | |
add_action( 'wp_enqueue_scripts', [ $this, 'dequeue_style' ], 9999 ); | |
} | |
public function dequeue_style() { | |
wp_dequeue_style( 'ecomus-woocommerce-style' ); | |
} | |
public function add_css() { | |
?> | |
<style> | |
.clearfix { | |
content: ""; | |
display: block; | |
table-layout: inherit; | |
} | |
</style> | |
<?php | |
} | |
} | |
new WFACP_Ecomus_Addons(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment