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
| add_filter( 'wfacp_need_payment_gateway_refresh', function () { | |
| return true; | |
| }, 100 ); |
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_CustomFields_Inside_Gateway { | |
| private $hook = 'woocommerce_checkout_after_terms_and_conditions'; | |
| private $hook_priority = 10; | |
| private $collected_fields = []; | |
| public function __construct() { | |
| add_action( $this->hook, [ $this, 'display_fields' ], $this->hook_priority ); |
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 WF_Allow_Theme_CSS_JS { | |
| private $allow_post_type = [ | |
| 'wffn_landing', | |
| 'wffn_ty', | |
| 'wffn_optin', | |
| 'wffn_oty', | |
| ]; |
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
| add_action( 'wfacp_internal_css', function () { ?> | |
| <script> | |
| window.addEventListener('load', function () { | |
| (function ($) { | |
| $('.wfacp_next_page_button').trigger('click') | |
| })(jQuery); | |
| }); |
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
| add_filter('wffn_allowed_themes', 'wffn_allow_current_theme_scripts' ); //for funnel builder pages ( sale, optin, optin thankyou and wc thankyou ) | |
| // add_filter('wfocu_allowed_themes', 'wffn_allow_current_theme_scripts' );// only for Upsell offer page | |
| function wffn_allow_current_theme_scripts( $args ){ | |
| //Allow current theme scripts and css for particular step in canvas template | |
| //'wfacp_checkout' for checkout | |
| //'wfocu_offer' for upsell | |
| //'wffn_landing' for landing | |
| //'wffn_ty' for wc thankyou |
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
| add_filter('wfocu_offers_to_cancel_primary', function(){ | |
| return [XXXXXX,XXXXX]; //replace with the offer IDs | |
| }); |
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_Hide_Address_Fields_On_Virtual_Cart { | |
| public function __construct() { | |
| add_action( 'wfacp_internal_css', [ $this, 'add_js' ] ); | |
| } | |
| public function add_js() { |
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
| add_filter( 'wfocu_offer_data', 'wfocu_custom_alter_price', 12, 3 ); | |
| function wfocu_custom_alter_price( $output, $offer_data, $is_front ) { | |
| $percentage_discount_on_order = 50; //put your dynamic percentage discount amount here | |
| if ( true === $is_front ) { | |
| foreach ( $output->products as &$product ) { | |
| if ( is_a( $product->data, 'WC_Product' ) ) { | |