Skip to content

Instantly share code, notes, and snippets.

View xlplugins's full-sized avatar

XLPlugins xlplugins

View GitHub Profile
@xlplugins
xlplugins / merge upsell subscription into one
Created August 31, 2026 14:43
merge upsell subscription into one
<?php
/**
* Runs after FunnelKit has created the upsell subscription (priority 99, so the
* gateway handlers that store the payment token on it have already run).
*
* @param WC_Subscription $new_subscription Subscription FunnelKit just created.
* @param string $hash Offer product hash (unused).
* @param WC_Order $subscription_order Order the upsell was recorded against.
@xlplugins
xlplugins / AB Test include bump + upsell revenue
Created August 28, 2026 05:37
AB Test include bump + upsell revenue
add_filter( 'bwfabt_conversion_revenue_column', function () {
return 'value';
} );
@xlplugins
xlplugins / AB Test include bump + upsell revenue
Created August 28, 2026 05:37
AB Test include bump + upsell revenue
add_filter( 'bwfabt_conversion_revenue_column', function () {
return 'value';
} );
@xlplugins
xlplugins / AB Test include bump + upsell revenue
Created August 28, 2026 05:37
AB Test include bump + upsell revenue
add_filter( 'bwfabt_conversion_revenue_column', function () {
return 'value';
} );
@xlplugins
xlplugins / Plakatdyr theme field Fk checkout compatibility 4
Created August 27, 2026 13:39
Plakatdyr theme field Fk checkout compatibility 4
<?php
/**
* Plugin Name: Plakatdyr — FunnelKit kundetype (MU)
* Description: Theme customer-type radios on FunnelKit only; plakatdr CSS if missing; small #plakatdr-kundete override so WFACP’s global input[type=radio] rules do not break layout. Removes the EAN Bruger ID field.
* Version: 1.7.2
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
@xlplugins
xlplugins / remove prefill billing country state value
Created August 25, 2026 13:19
remove prefill billing country state value
add_action( 'wp_footer', function () {
if ( ! function_exists( 'WFACP_Core' ) ) {
return;
}
?>
<script>
jQuery( function ( $ ) {
$( document.body ).on( 'change', '#billing_same_as_shipping,.billing_same_as_shipping', function () {
var $el = $( this );
var different = ( 'radio' === $el.prop( 'type' ) ) ? ( 'option_2' === $el.val() ) : $el.is( ':checked' );
@xlplugins
xlplugins / add_image_before_term_and_condtion_text
Last active August 25, 2026 08:37
Add image before term and condtion text
/**
* Add a custom image below the payment gateways, above the privacy policy text.
*/
add_action( 'woocommerce_checkout_before_terms_and_conditions', 'custom_checkout_payment_image', 10 );
function custom_checkout_payment_image() {
$image_url = 'https://siteurl.com/wp-content/uploads/2026/08/plata_rate_medusa-final-2.jpg';
?>
<div class="custom-checkout-payment-image">
@xlplugins
xlplugins / Plakatdyr theme field Fk checkout compatibility 3
Last active August 26, 2026 13:02
Plakatdyr theme field Fk checkout compatibility 3
<?php
/**
* Plugin Name: Plakatdyr — FunnelKit kundetype (MU)
* Description: Theme customer-type radios on FunnelKit only; plakatdr CSS if missing; small #plakatdr-kundete override so WFACP’s global input[type=radio] rules do not break layout.
* Version: 1.7.1
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
@xlplugins
xlplugins / FunnelKit - conversion tracking journey column fix
Last active August 24, 2026 08:20
FunnelKit - conversion tracking journey column fix
<?php
/**
* Plugin Name: FunnelKit - conversion tracking journey column fix
* Description: On-demand repair for the repeating "Duplicate column name 'journey'" database error. Runs only when an administrator loads a wp-admin URL with ?fk_fix_journey=1 - it verifies the column and marks that migration done, so the plugin stops re-running the ALTER and printing the error into admin responses (which blocks plugin uploads). Idle otherwise.
* Version: 1.1.0
*/
defined( 'ABSPATH' ) || exit;
add_action( 'admin_init', function () {
@xlplugins
xlplugins / FunnelKit × Seel Worry-Free Purchase — checkout badge fix
Created August 21, 2026 14:41
FunnelKit × Seel Worry-Free Purchase — checkout badge fix
<?php
/**
* Plugin Name: FunnelKit × Seel Worry-Free Purchase — checkout badge fix
* Description: Seel's SDK renders its badge on the `updated_checkout` event and draws into the
* first `.seal-wfp-widget-container` it finds. On a FunnelKit Aero checkout the order
* summary is a live AJAX fragment: FunnelKit rebuilds it without surfacing a catchable
* `updated_checkout` at the right time, and outputs the container in several places
* (incl. a hidden one). Result: the badge either never shows or shows in a hidden box.
* This nudges Seel on FunnelKit's own refresh events and moves the badge into the
* visible order-summary container. No persistent MutationObserver — event driven.