Skip to content

Instantly share code, notes, and snippets.

View xlplugins's full-sized avatar

XLPlugins xlplugins

View GitHub Profile
@xlplugins
xlplugins / gist:2444a4c412af5f13834169c6f39d1a39
Created December 1, 2025 12:10
FunnelKit Checkout - Aruba Fatturazione Elettronica Compatibility
if ( ! class_exists( 'WFACP_Compatibility_Aruba_Fatturazione_Elettronica' ) ) {
#[AllowDynamicProperties]
class WFACP_Compatibility_Aruba_Fatturazione_Elettronica {
/**
* Aruba field keys in correct display order
* Customer type and invoice choice first, then fiscal data heading, then tax fields
*
* @var array
*/
@xlplugins
xlplugins / gist:774beda614d6c1b2b9facb8529f9b3a7
Created December 1, 2025 11:13
Funnelkit Cart: Auto-open Funnel Kit cart when BodyCommerce AJAX add to cart completes
add_action( 'wp_footer', function () {
?>
<script>
jQuery(function($) {
$(document).ajaxComplete(function(event, jqxhr, settings) {
// Check in settings.data (POST data) for the action
if (settings && settings.data &&
settings.data.indexOf('action=bodycommerce_ajax_add_to_cart_woo') > -1 &&
jqxhr.status === 200) {
@xlplugins
xlplugins / gist:1b43aa8c036535a34699847ad3a17ec0
Created November 25, 2025 10:47
Funnelkit Checkout:Add Shipping Location for Chwazi - Delivery & Pickup Scheduling plugin
add_filter('lpac_dps_available_location_hooks', function ( $hooks ) {
$hooks['wfacp_before_shipping_calculator_field'] = __( 'Funnelkit Checkout Before Shipping Method', 'delivery-and-pickup-scheduling-for-woocommerce' );
$hooks['wfacp_after_shipping_calculator_field'] = __( 'Funnelkit Checkout After Shipping Method', 'delivery-and-pickup-scheduling-for-woocommerce' );
return $hooks;
});
@xlplugins
xlplugins / gist:6aa474ff8c09944dbce968aaa18954eb
Last active November 26, 2025 05:43
FunnelKit OrderBump Auto-Select & Cart Total Exclusion
class WFOB_Bump_Pre_Select_Fix {
/**
* OrderBump IDs to auto-select
*
* @var array
*/
private $bump_ids = array( 5503 ); // Your OrderBump IDs here in comma separated 2363, 2302, 2895
/**
@xlplugins
xlplugins / Funnelkit Checkout: Allow hyperlink in the custom fields label
Last active November 14, 2025 13:28
Funnelkit Checkout: Allow hyperlink in the custom fields label
@xlplugins
xlplugins / gist:fb18507a961b882ff326b40249bbb79c
Last active November 12, 2025 14:03
FunnelKit Checkout - Order Summary, Mini Cart & Collapsible Order Summary Hooks
# FunnelKit Checkout - Order Summary, Mini Cart & Collapsible Order Summary Hooks
This document contains all WordPress hooks (actions and filters) used in the Order Summary, Mini Cart, and Collapsible Order Summary components of the FunnelKit checkout.
---
## Table of Contents
1. [Order Summary Hooks](#order-summary-hooks)
2. [Mini Cart Hooks](#mini-cart-hooks)
@xlplugins
xlplugins / gist:c545ec2974da6a9ffed7d87ba2fe8c5b
Created November 12, 2025 13:10
Funnelkit Cart: Products Type Simple Exculde from Blacklist
add_filter( 'fkcart_product_support_select_options', function($status, $_product){
if($_product->get_type()=='simple'){
$status = true;
}
return $status;
} ,11,2);
@xlplugins
xlplugins / Dynamic upsell offer
Created November 12, 2025 07:30
Dynamic upsell offer
new WFOCU_Dynamic_Update_Offer_Product();
class WFOCU_Dynamic_Update_Offer_Product {
public function __construct() {
add_filter( 'wfocu_prepare_upsell_package_before', [ $this, 'maybe_dynamic_update_product' ], 10, 1 );
add_filter( 'wfocu_build_offer_product_before', [ $this, 'maybe_add_dynamic_product_in_offer' ], 10, 3 );
}
/**
* add upsell if user want for specific upsell else default return true
@xlplugins
xlplugins / gist:dfd3780bfd1a1dd0b135ab09cf5e2dc9
Last active November 12, 2025 07:36
Funnelkit Checkout: Compatability with theme Smart Home by Fuel Themes
class WFACP_Smart_Home_Theme {
public function __construct() {
add_action( 'wfacp_after_checkout_page_found', [$this, 'remove_action'] );
add_action( 'wfacp_checkout_after_order_review', [ $this, 'actions' ], 99 );
add_action( 'wfacp_internal_css', [$this, 'add_css'] );
}
public function remove_action() {
@xlplugins
xlplugins / gist:bcb25190f24ee5de6c3a6a439d131a54
Created November 11, 2025 11:15
Funnelkit Cart: Slide Cart Trigger when bundle product added by Version 2.0.2 | By WowRevenue
add_action( 'wp_footer', function () {
?>
<script>
(function () {
window.addEventListener('load', function () {
(function ($) {