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 Funnekit_Enable_delete_Specail_Add_on { | |
public function __construct() { | |
add_filter( 'wfacp_enable_delete_item', [ $this, 'display' ], 101, 2 ); | |
} | |
public function display( $status, $cart_item ) { | |
if (isset($cart_item['_fkcart_spl_addon']) && $cart_item['_fkcart_spl_addon']==true) { |
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_Disable_Upsells { | |
public function __construct() { | |
add_action( 'fkcart_before_cart_items', [ $this, 'init_filters' ] ); | |
} | |
public function init_filters() { | |
add_filter( 'woocommerce_product_get_upsell_ids', [ $this, 'remove_upsell_ids' ], 10, 2 ); | |
add_filter( 'woocommerce_product_get_cross_sell_ids', [ $this, 'remove_cross_sell_ids' ], 10, 2 ); | |
add_filter( 'fkcart_default_upsells', [ $this, 'remove_fkcart_default_upsells' ] ); |
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 () { | |
wp_dequeue_script( 'wfacp_google_js' ); | |
}, 101 ); | |
add_action( 'wp_footer', function () { | |
if(!is_checkout()){ | |
return; | |
} | |
?> | |
<script> | |
window.addEventListener('load', function () { |
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_Add_To_cart_On_Page_Load { | |
public function __construct() { | |
add_action( 'wp_footer', [ $this, 'add_js' ] ); | |
add_filter('fkcart_re_run_get_slide_cart_ajax', '__return_true', 9999); | |
add_action( 'wp_head', [$this,'action'], 99999); | |
} | |
public function action() { |
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 FKWCS_Klarna_message_div { | |
public function __construct() { | |
add_action( 'woocommerce_after_template_part', [ $this, 'render_paylater' ] ); | |
add_action( 'wp_footer', [ $this, 'render_paylater_message_div' ], 99 ); | |
} | |
public function render_paylater( $template_name ) { | |
if ( ( $template_name === 'single-product/add-to-cart/variable.php' || $template_name === 'single-product/add-to-cart/simple.php' ) && is_product() ) { |
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_Woolentor_Addon{ | |
public function __construct() { | |
add_action( 'wfacp_checkout_page_found', [ $this, 'action' ], 15 ); | |
} | |
public function action() { | |
$is_global_checkout = WFACP_Core()->public->is_checkout_override(); | |
if(class_exists('Woolentor_Woo_Custom_Template_Layout_Pro') && false === $is_global_checkout) { | |
WFACP_Common::remove_actions('template_include','Woolentor_Woo_Custom_Template_Layout_Pro','change_page_template'); | |
} | |
} |
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_Checkout_Mismatch_Handler { | |
private $logger; | |
public function __construct() { | |
$this->logger = wc_get_logger(); | |
add_filter( 'woocommerce_add_cart_item', [ $this, 'add_cart_item_checkout_page_id' ], 10 ); | |
add_filter( 'woocommerce_update_order_review_fragments', [ $this, 'check_checkout_page_id_fragment' ] ); | |
add_action( 'woocommerce_after_checkout_validation', [ $this, 'validate_checkout_page_match' ], 10, 2 ); |
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_Add_To_cart_On_Page_Load { | |
public function __construct() { | |
add_action( 'wp_footer', [ $this, 'add_js' ] ); | |
} | |
public function add_js() { | |
?> | |
<script> | |
window.addEventListener('load', function () { | |
jQuery(document.body).on('fkcart_cart_open', function () { |
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_Billing_Email_Autofill_Disabled_zoom{ | |
public function __construct() { | |
add_filter( 'wfacp_forms_field', [ $this, 'add_css_class' ], 99, 2 ); | |
add_filter('wfacp_intial_scale_default','__return_true'); | |
} | |
function add_css_class( $field, $key ) { | |
if ( $key !== 'billing_email' || !isset($field['autocomplete'])) { | |
return $field; |
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
/** | |
* Conditionally removes the FunnelKit (WooFunnels) frontend tracking scripts. | |
* | |
* This function checks if the "Track UTMs" setting in FunnelKit's general settings | |
* is disabled. If it is, it removes the action responsible for enqueuing the | |
* e-commerce tracking scripts, preventing them from being loaded on the site's frontend. | |
* | |
* It hooks into 'wp_enqueue_scripts' with a very early priority (-1) to ensure | |
* it runs before the target action is executed. | |
* |
NewerOlder