Skip to content

Instantly share code, notes, and snippets.

View xlplugins's full-sized avatar

XLPlugins xlplugins

View GitHub Profile
@xlplugins
xlplugins / gist:854212eda7040b66160a48f071c2f266
Last active December 24, 2025 11:39
Ensure wfacp-form-control class exists on billing state and city fields
add_action( 'wfacp_internal_css', function() {
?>
<script>
(function($) {
function addClassIfMissing() {
var $fields = $('#billing_state, #billing_city');
$fields.each(function() {
if (!$(this).hasClass('wfacp-form-control')) {
$(this).addClass('wfacp-form-control');
@xlplugins
xlplugins / fluent_forms_optin.php
Created December 23, 2025 13:52
Fluent Forms + FunnelKit Optin forms
/**
* Fluent Forms submission -> FunnelKit Optin contact + optin entry + analytics tracking
* With debug logging in key areas.
*/
/**
* ONE-TIME cleanup: delete all opt-in conversions from BWF conversion tracking table.
* Optin conversions are identified by `type = 1` (per schema).
*
@xlplugins
xlplugins / gist:f33732a7934d59f1a8d260fdda8f35fd
Created December 22, 2025 12:30
Funnelkit Checkout: Smart Buttons Script Enqueuing Improvements
add_filter('wfacp_enqueue_smart_buttons_inline_script','__return_true');
@xlplugins
xlplugins / Remove CSS of PayPal
Created December 19, 2025 14:14
Remove CSS of PayPal
add_action( 'wfacp_after_checkout_page_found', function() {
// Only proceed if we're on a FunnelKit checkout page
if ( ! class_exists( 'WFACP_Common' ) ) {
return;
}
$wfacp_id = WFACP_Common::get_id();
if ( empty( $wfacp_id ) ) {
return;
}
@xlplugins
xlplugins / gist:efec709e82ac1e4647828fe8d6644af6
Created December 19, 2025 06:55
Ensures billing fields are properly copied from shipping address when billing address is optional and "same as shipping" is selected.
if ( ! class_exists( 'WFACP_Billing_Field_Copy_Handler' ) ) {
class WFACP_Billing_Field_Copy_Handler {
/**
* Fields that should be copied from shipping to billing
*
* @var array
*/
private $copy_fields = array(
'first_name',
@xlplugins
xlplugins / gist:aad003546575c964086c9ea1c0a00558
Created December 18, 2025 12:47
Funnelkit Checkout: Unset billing Document
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;
}
@xlplugins
xlplugins / gist:b628d96487a508e50b744fa7b3eac56c
Created December 16, 2025 10:57
Trigger Slide Cart on Shop Page When Returning from Checkout
class Fkcart_Trigger_Slide_cart_retrun_from_checkout {
public function __construct() {
add_action( 'wp_footer', [ $this, 'js' ] );
}
public function js() {
if(!is_shop()) {
@xlplugins
xlplugins / gist:6d2a3fb7612487166a9074df6d549248
Created December 15, 2025 12:55
Funnelkit order Bump: Exclude bump Js from Sg Optimizer
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;
}
@xlplugins
xlplugins / Disable JetEngine Listing Overlay Click While Preserving Add to Cart (JetEngine Compatibility Fix) - Crocoblock
Last active December 15, 2025 12:05
Cart: Disable JetEngine Listing Overlay Click While Preserving Add to Cart (JetEngine Compatibility Fix) - Crocoblock
add_action( 'wp_footer', function () {
?>
<script type="text/javascript">
(function($){
/**
* -------------------------------
* 1. Your cart property logic
* -------------------------------
@xlplugins
xlplugins / gist:fc5ec58fcad471cad4557a4e5f8e3179
Created December 15, 2025 08:40
Funnelkit Checkout: Moyasar Payment Gateway - FunnelKit Checkout Compatibility Fix
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;
}