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( 'woocommerce_checkout_fields', 'custom_override_checkout_fields', 9999999 ); | |
| function custom_override_checkout_fields( $fields ) { | |
| if(!$_POST['billing_document']){ | |
| unset( $fields['billing']['billing_document']['required'] ); | |
| } | |
| return $fields; | |
| } |
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 Fkcart_Trigger_Slide_cart_retrun_from_checkout { | |
| public function __construct() { | |
| add_action( 'wp_footer', [ $this, 'js' ] ); | |
| } | |
| public function js() { | |
| if(!is_shop()) { |
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( 'sgo_js_minify_exclude', 'emd_exclude_mv_scripts_handles' ); | |
| add_filter( 'sgo_javascript_combine_exclude', 'emd_exclude_mv_scripts_handles' ); | |
| add_filter( 'sgo_js_async_exclude', 'emd_exclude_mv_scripts_handles' ); | |
| function emd_exclude_mv_scripts_handles( $exclude_list ) { | |
| $exclude_list[] = 'wfob-bump'; | |
| return $exclude_list; | |
| } |
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( 'wp_footer', function () { | |
| ?> | |
| <script type="text/javascript"> | |
| (function($){ | |
| /** | |
| * ------------------------------- | |
| * 1. Your cart property logic | |
| * ------------------------------- |
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('wp_enqueue_scripts', function() { | |
| // Only run on checkout pages | |
| if (!is_checkout()) { | |
| return; | |
| } | |
| // Check if FunnelKit is active and we're on a FunnelKit checkout page | |
| if (!class_exists('WFACP_Common')) { | |
| return; | |
| } |
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 DoubleYourBump { | |
| /** | |
| * Order Bump ID | |
| */ | |
| private $order_bump_id = 5699; // Order Bump | |
| /** | |
| * Discount percentage (e.g., 10 for 10% off, 20 for 20% off) |
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
| function load_wc_cart_fragments() { | |
| if (is_product()) { | |
| wp_enqueue_script('wc-cart-fragments'); | |
| } | |
| } | |
| add_action('wp_enqueue_scripts', 'load_wc_cart_fragments',9999); |
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 TEMP_WFACP_Conditional_Field_Depend_On_Payment { | |
| private $conditional_field = []; | |
| private $exclude_wfacp_ids = []; | |
| /** | |
| * @var string Payment method bank transfer selected then show fields | |
| */ | |
| private $payment_method_selected = 'fkwcs_stripe_klarna'; | |
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( 'woocommerce_order_button_html', function( $button_html ) { | |
| // Check if we're on a FunnelKit checkout page | |
| if ( ! function_exists( 'wfacp_template' ) ) { | |
| return $button_html; | |
| } | |
| $instance = wfacp_template(); | |
| if ( ! $instance ) { | |
| return $button_html; | |
| } |
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
| if ( ! class_exists( 'WFOB_Cascading_Bumps_Handler' ) ) { | |
| class WFOB_Cascading_Bumps_Handler { | |
| /** | |
| * Flag to track if fragment unsetting should be processed | |
| * | |
| * @var bool | |
| */ | |
| private $process = false; |