Skip to content

Instantly share code, notes, and snippets.

View xlplugins's full-sized avatar

XLPlugins xlplugins

View GitHub Profile
@xlplugins
xlplugins / gist:b7040d6073f53dab7624a476933ffc1c
Created November 4, 2025 12:12
Funnelkit Cart: Display Save Price without round off
add_filter( 'fkcart_cart_item_saving_decimal_precision', function() {
return 2; // Show up to 2 decimals
});
@xlplugins
xlplugins / gist:bfd6e84ba2d773198cd32bdf6af39f16
Created October 31, 2025 07:49
FunnelKit Cart - Debounce quantity updates
add_filter('fkcart_quantity_debounce_delay', function() {
return 600;
});
class WFACP_Compatibility_CountryCodeFor_Elementor_Form_Telephone {
public function __construct() {
add_action( 'wp', [ $this, 'deque_script_optin' ] );
}
public function deque_script_optin() {
if ( ! WFOPP_Core()->optin_pages->is_wfop_page() ) {
return;
}
@xlplugins
xlplugins / gist:86f4f79f620abe3ccc1fce39529568c7
Created October 30, 2025 08:51
Fix WFACP Shimmer Animation on Shipping Method Change
add_action('wfacp_internal_css', function() {
?>
<script type="text/javascript">
(function($) {
'use strict';
// Enable shimmer animation trigger for shipping method changes
function enableShimmerTrigger() {
if (window.refresh_page_data_load_trigger === false) {
window.refresh_page_data_load_trigger = true;
@xlplugins
xlplugins / gist:4afac4eb85c4a56be02c9bcd78930762
Last active October 29, 2025 12:00
Funnelkit Checkout: Disabled Next Button when packeta_shipping_method Value empty
class WFACP_Custom_Shipping_Method_Compatibility {
public function __construct() {
add_action( 'wfacp_internal_css', [ $this, 'add_js' ] );
}
public function add_js() {
?>
<script>
(function($) {
@xlplugins
xlplugins / gist:90cbbc10292c14911e192f4bd5f6fdb1
Created October 27, 2025 06:21
FunnelKit Checkout + Constant Contact WooCommerce Position Moved to billing email address
if ( ! class_exists( 'WFACP_Compatibility_Constant_Contact' ) ) {
class WFACP_Compatibility_Constant_Contact {
private $instance;
private $process_field = false;
public function __construct() {
add_action( 'wfacp_after_checkout_page_found', [ $this, 'setup_hooks' ] );
add_action( 'wfacp_internal_css', [ $this, 'add_css' ] );
}
@xlplugins
xlplugins / Funnelkit Cart: Slide Cart Trigger when add to cart clicked
Last active October 24, 2025 08:07
Funnelkit Cart: Slide Cart Trigger when add to cart clicked
add_action( 'wp_footer', function () {
?>
<script>
(function () {
window.addEventListener('load', function () {
(function ($) {
@xlplugins
xlplugins / Cart : Add price value in free gift
Created October 21, 2025 11:19
change free gift price from 0 to 0.01
if ( ! class_exists( 'ASEPTA_FreeGift_PriceFix' ) ) {
class ASEPTA_FreeGift_PriceFix {
public function __construct() {
// Remove FKCart filters early to prevent conflicts
add_action( 'init', [ $this, 'detach_fkcart_price_filters' ], 5 );
// Set 0.01 PLN for free gift items
add_action( 'woocommerce_before_calculate_totals', [ $this, 'set_one_grosz' ], 99 );
add_action( 'woocommerce_cart_loaded_from_session', [ $this, 'set_one_grosz' ], 99 );
@xlplugins
xlplugins / fk_upsell_fetch_trans_id.php
Created October 17, 2025 14:20
Fetch Upsell Transaction IDs by Parent Order
$order_id = 44534535;
$wfocu_session_ids = WFOCU_Core()->track->query_results( array(
'data' => array(
'id' => array(
'type' => 'col',
'function' => '',
'name' => 'session_id',
@xlplugins
xlplugins / gist:8d8753ea3b8de63effb487b19f394a62
Created October 17, 2025 14:00
Funnelkit Checkout: Compatibility With Plugin Hezarfen Turkish Address
if ( ! class_exists( 'WFACP_Compatibility_With_Hezarfen_Turkish_Address' ) ) {
class WFACP_Compatibility_With_Hezarfen_Turkish_Address {
public function __construct() {
// Ensure proper field types in FunnelKit
add_filter( 'wfacp_checkout_fields', [ $this, 'modify_field_types' ], 999 );
// Add JavaScript for re-initialization
add_action( 'wfacp_internal_css', [ $this, 'add_internal_js_css' ] );