Skip to content

Instantly share code, notes, and snippets.

View keshav1990's full-sized avatar

Keshav Kalra keshav1990

View GitHub Profile
@xlplugins
xlplugins / Do not run update order review on last step
Created May 8, 2023 15:24
Do not run update order review on last step
add_action( 'wfacp_internal_css', function () {
?>
<style>
body #payment.wfacp_enable_loader .blockUI {
display: block !important;
}
</style>
<script>
window.addEventListener('load', function () {
if (undefined !== wfacp_frontend) {
@xlplugins
xlplugins / FUnnelkit datalogic Hidden Field Snippet
Created April 28, 2023 07:20
FUnnelkit datalogic Hidden Field Snippet
add_action('wfacp_after_checkout_form_fields', function (){
?>
<input type="hidden" name="datalogics_n_code" id="datalogics_n_code" value="" form="wfacp_checkout_form">
<input type="hidden" name="datalogics_n_code_platform_id" id="datalogics_n_code_platform_id" value="" form="wfacp_checkout_form">
<?php
});
@xlplugins
xlplugins / firing different pixels per language
Last active May 28, 2025 08:44
firing different pixels per language
class FunnelKit_Multiple_Pixel {
public function __construct() {
// Liste des hooks groupés par type
$this->add_filters( [
// Facebook Pixel ID
'wfocu_fb_pixel_ids',
'bwf_fb_pixel_ids',
'wfacp_fb_pixel_ids'
], 'get_fb_pixel_id' );
@xlplugins
xlplugins / allow funnelkit cart on Sales landing page
Last active July 7, 2023 12:57
allow funnelkit cart on sales landing page #cart
add_filter( 'fkcart_disabled_post_types', function ( $post_types ) {
$post_types=array_filter( $post_types, function ( $i ) {
return $i != 'wffn_landing';
} );
return $post_types;
} );
@xlplugins
xlplugins / define is cart in ajax for min max plugin CodeAstrology Team
Last active August 21, 2023 12:50
define is cart in ajax for min max plugin CodeAstrology Team
class Fkcart_Min_Max_Snippet {
public function __construct() {
add_filter( 'woocommerce_quantity_input_args', [ $this, 'define_cart' ], - 1 );
}
public function define_cart($args) {
if ( wp_doing_ajax() ) {
wc_maybe_define_constant( 'WOOCOMMERCE_CART', true );
}
return $args;
@xlplugins
xlplugins / gist:94d3a81085fbc3553d9e03cd7187cb2a
Created March 6, 2023 12:40
Display Multiple country for specific checkout pages
class WFACP_Multiple_Country_Multilple_Checkout {
private $country = [
'DE',
'GB',
];
private $checkout_ids = [
'384387',
'384341',
];
@xlplugins
xlplugins / order before after event listener
Last active July 7, 2023 12:56
order bump before after event listener
window.addEventListener('load', function () {
wfob_frontend.hooks.addAction('wfob_before_ajax_add_order_bump', function () {
//put your code here when before order bump added to cart ajax run
});
wfob_frontend.hooks.addAction('wfob_before_ajax_remove_order_bump', function () {
//put your code here when before order bump remove item from cart ajax run
});
@xlplugins
xlplugins / gist:13080af3302571fee7f44e74a9966000
Created March 1, 2023 10:39
billing Shipping Phone Field Masking
class WFACP_billing_Phone_Field_Masking {
private $fields=['billing_phone','shipping_phone'];
public function __construct() {
add_filter( 'woocommerce_form_field_args', [ $this, 'add_default_styling' ], 10, 2 );
add_action( 'wp_footer', [ $this, 'internal_css_js' ] );
}
@xlplugins
xlplugins / gist:4158b69e9bffb5c8972a9e2f2abdaafe
Last active July 7, 2023 12:56
Trigger Update checkout in funnelkit checkout multi step final step
add_action( 'wfacp_internal_css', function () {
?>
<style>
#payment ul li div.payment_box {
display: none;
}
#payment ul li:first-child div.payment_box{
display:block;
}
@xlplugins
xlplugins / gist:8cebd4b145620e7eeda69a253e2da04b
Last active July 7, 2023 12:56
Display Html According To product add to cart in funnelkit checkout
class WFACP_Display_Product_Html_by_Id {
private $product_ids = [];
private $selected_product = 0;
private $display_products = [
564,
1474,
];