Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Created February 10, 2023 13:32
Show Gist options
  • Save xlplugins/aa9148db7a6784720fc5e3b0b4fb6929 to your computer and use it in GitHub Desktop.
Save xlplugins/aa9148db7a6784720fc5e3b0b4fb6929 to your computer and use it in GitHub Desktop.
Funnelkit Checkout comptability added with ReCaptcha For WC by Thirteen Web Solution
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