-
-
Save tharlab/a2c018cc5f95476bc119db4a4ccc9c8b to your computer and use it in GitHub Desktop.
Funnelkit Checkout comptability added with ReCaptcha For WC by Thirteen Web Solution
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 WFACP_ReCaptcha_For_WC { | |
private $instance = null; | |
public function __construct() { | |
add_action( 'wfacp_template_load', [ $this, 'actions' ] ); | |
} | |
public function is_enable() { | |
return class_exists( 'I13_Woo_Recpatcha' ); | |
} | |
public function actions() { | |
if ( ! $this->is_enable() ) { | |
return; | |
} | |
$this->instance = WFACP_Common::remove_actions( 'woocommerce_review_order_before_submit', 'I13_Woo_Recpatcha', 'i13woo_extra_checkout_fields' ); | |
if ( $this->instance instanceof I13_Woo_Recpatcha ) { | |
add_action( 'wfacp_woocommerce_review_order_before_submit', [ $this->instance, 'i13woo_extra_checkout_fields' ] ); | |
} | |
} | |
} | |
new WFACP_ReCaptcha_For_WC(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment