Skip to content

Instantly share code, notes, and snippets.

View xlplugins's full-sized avatar

XLPlugins xlplugins

View GitHub Profile
@xlplugins
xlplugins / Custom FB Pixel & Token per checkout
Created August 3, 2026 12:00
Custom FB Pixel & Token per checkout
/**
* Plugin Name: FunnelKit — Custom FB Pixel & Token per checkout / upsell
* Description: Use a different Facebook pixel id + Conversions API access token on specific Aero checkout pages and specific upsell funnels. Every other page keeps the global pixel/token from settings. Add as many rows as needed.
* Version: 1.1.0
*/
defined( 'ABSPATH' ) || exit;
/* ==== EDIT THESE =========================================================
* Add one row per checkout / upsell. Any id not listed keeps the global
@xlplugins
xlplugins / WFACP — Cart- checkout-page mismatch guard
Created July 31, 2026 11:29
WFACP — Cart / checkout-page mismatch guard
<?php
/**
* Plugin Name: WFACP — Cart / checkout-page mismatch guard
* Description: Prevents wrong-product orders on FunnelKit (Aero) checkouts sharing one WooCommerce session. Stamps every Aero cart item with the checkout page that added it, detects foreign items during checkout render and self-corrects via one guarded reload. As a final safety net it blocks a mismatched order submission with a visible notice, then auto-reloads so the page loads its own product and the customer can place the order again.
* Version: 2.0.0
*/
defined( 'ABSPATH' ) || exit;
if ( ! class_exists( 'WFACP_Cart_Mismatch_Guard' ) ) {
@xlplugins
xlplugins / WFOCU — Block checkout during active upsell session
Created July 30, 2026 14:01
WFOCU — Block checkout during active upsell session
<?php
/**
* Plugin Name: WFOCU — Block checkout during active upsell session (snippet of PR #2180)
* Description: Standalone copy of woofunnels-upstroke-one-click-upsell PR #2180. Blocks a new checkout submission while the customer's upsell session is still active (e.g. browser Back after paying the primary order), and normalizes wfocu-pri-order status on the thank-you page. Remove once the fix ships in the plugin.
* Version: 1.0.0
*/
defined( 'ABSPATH' ) || exit;
add_action( 'init', function () {
@xlplugins
xlplugins / Glozin Compatibility
Last active August 4, 2026 14:35
Glozin Compatibility
<?php
/**
* Plugin Name: WFACP × Glozin Compatibility
* Description: Fixes Glozin theme/addons conflicts on FunnelKit Aero checkout — blank Elementor-editor form (checkout-limit TypeError), duplicate coupon/login, duplicate thumbnail, extra info box, payment-box overflow.
* Version: 3.2.0
*/
defined( 'ABSPATH' ) || exit;
/** On, or editing, an Aero checkout (live page, preview, editor, or elementor_ajax render). */
@xlplugins
xlplugins / FunnelKit Stripe — Webhook Health Admin Notice
Created July 29, 2026 11:54
FunnelKit Stripe — Webhook Health Admin Notice
<?php
/**
* Plugin Name: FunnelKit Stripe — Webhook Health Admin Notice
* Description: Shows a WordPress admin notice when the Stripe webhook appears broken:
* (a) the last webhook delivery failed, (b) a webhook is configured but has
* been silent for over a day, or (c) the live webhook endpoint in Stripe is
* missing / disabled / pointing to a different URL — verified through the
* plugin's own fkwcs_check_live_webhook_url ajax, throttled to every 12h.
* The notice clears automatically once the webhook works again.
*/
@xlplugins
xlplugins / per-order upsell analytics from One-Click Upsells
Created July 28, 2026 15:15
per-order upsell analytics from One-Click Upsells
add_action( 'admin_init', function () {
if ( empty( $_GET['wfocu_export_csv'] ) || ! current_user_can( 'manage_woocommerce' ) ) {
return;
}
global $wpdb;
$rows = $wpdb->get_results(
"
SELECT
@xlplugins
xlplugins / PayPlug + Permalink Manager Pro comp
Created July 28, 2026 15:02
PayPlug + Permalink Manager Pro comp
@xlplugins
xlplugins / Cancel WooPayment (Stripe Billing ) when sublium subscription Cancelled
Created July 23, 2026 07:48
Cancel WooPayment (Stripe Billing ) when sublium subscription Cancelled
/**
* Snippet: Cancel the linked WooPayments/Stripe subscription when a Sublium
* subscription is fully cancelled (status 9).
*
* mu-plugin — loads automatically, no activation needed. Standalone — does
* not depend on Sublium WCS Manager.
*
* Requires: WooCommerce Payments (WooPayments) active. The Stripe subscription
* ID is read directly from the Sublium subscription's own meta
* (`_wcpay_subscription_id`).
@xlplugins
xlplugins / ignore products from specific categories
Last active July 23, 2026 13:01
Cart: Exclude reward from specific categories #102355178
<?php
/**
* FunnelKit Cart Rewards — ignore products from specific categories.
*
* Behaviour:
* - Products in the excluded categories are IGNORED when calculating Cart Rewards
* (their value does not count toward reward progress).
* - Products in the included categories always count, regardless of the order
* they were added to the cart.
* - The Cart Rewards progress bar stays visible even when excluded-category
@xlplugins
xlplugins / Cookie Debug
Created July 22, 2026 11:42
BWF Cookie Round-Trip Probe (temporary)