Skip to content

Instantly share code, notes, and snippets.

View xlplugins's full-sized avatar

XLPlugins xlplugins

View GitHub Profile
@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' ] );
@xlplugins
xlplugins / gist:22cd9949ec8d0e81a5a2334de26e2ec9
Created October 17, 2025 13:20
Funnelkit Checkout: Remove elementor css and js on the elementor prebuilt templates
class WFACP_Compatibility_Remove_Elementor_Styles_And_Scripts {
public function __construct() {
// Only run on WFACP checkout pages
add_action( 'wfacp_after_checkout_page_found', [ $this, 'init' ] );
}
public function init() {
// Check if it's a prebuilt template
$template_instance = wfacp_template();
@xlplugins
xlplugins / gist:92993edf8f33ed4e9df0b43bc743fcab
Created October 17, 2025 12:03
FunnelKit Cart & Gifty for WooCommerce - Simplified Compatibility Fix
if ( ! class_exists( 'FKCart_Gifty_Compatibility' ) ) {
class FKCart_Gifty_Compatibility {
private static $instance = null;
private $is_gift_card = false;
public static function get_instance() {
if ( null === self::$instance ) {
self::$instance = new self();
}
@xlplugins
xlplugins / gist:db00d0569f60b6e6df2df81503aadf9a
Created October 17, 2025 11:37
Make Postcode field empty when auto address run
add_action( 'wfacp_internal_css', function () {
?>
<script>
window.addEventListener('load', function () {
(function ($) {
wfacp_frontend.hooks.addFilter('wfacp_country_address_google_format', function (output,components) {
output._postcode = '';