Skip to content

Instantly share code, notes, and snippets.

View xlplugins's full-sized avatar

XLPlugins xlplugins

View GitHub Profile
@xlplugins
xlplugins / gist:bfcfab5b057e1c0a0719b9dccce5d7df
Created February 4, 2021 08:22
unset link on xl thank you page
add_filter ( 'woocommerce_order_item_permalink' , '__return_false' );
add_action( 'woocommerce_account_downloads_column_download-product','xlwcty_remove_hyper_link_from_download_product');
function xlwcty_remove_hyper_link_from_download_product($download)
{
echo esc_html( $download['product_name'] );
}
@xlplugins
xlplugins / unset-shipping-address-when-local-pickup-selected.php
Last active January 7, 2026 07:43
Hide Shipping Address Fields if local pickup is selected Final Code 7 jan 2026
class WFACP_Hide_Shipping_Fields_By_Method {
public function __construct() {
add_filter( 'woocommerce_update_order_review_fragments', [ $this, 'attach_fragments' ], 1000 );
add_action( 'wfacp_before_process_checkout_template_loader', [ $this, 'register_hooks' ] );
add_action( 'wfacp_after_checkout_page_found', [ $this, 'register_hooks' ] );
add_action( 'wfacp_internal_css', [ $this, 'enqueue_assets' ] );
add_filter( 'woocommerce_checkout_posted_data', [ $this, 'clear_hidden_field_data' ] );
}
@xlplugins
xlplugins / wffn_show_menu_upsell.php
Last active February 17, 2021 10:45
Allow upsell menu to show to the funnel builder users #funel builder
add_filter('wffn_show_menu_upsell','__return_true');
@xlplugins
xlplugins / Collapsible order summary on mobile open on first load and then can close on click
Last active December 28, 2021 06:52
Collapsible order summary on mobile open on first load and then can close on click
add_action( 'wfacp_internal_css', 'exute_custom_aero_js' );
function exute_custom_aero_js() {
?>
<style>
@media (min-width: 992px)and (max-width: 1366px) {
.wfacp_collapsible_order_summary_wrap.wfacp_tablet.wfacp_mobile {
display: none;
}
}
@xlplugins
xlplugins / do-not-print-cart-error-notice-on-checkout.php
Created August 21, 2020 10:32
do not print cart error notice on checkout page
<?php
add_filter( 'wfacp_print_cart_error_notice', '__return_false' );
?>
@xlplugins
xlplugins / Do not assign billing email as username in aerocheckout and allow special character in email
Last active February 23, 2022 07:13
Allow special character in email and Do not assign billing email as username in aerocheckout
add_filter( 'wfacp_assign_email_as_a_username', '__return_false' );
<?php
add_filter( 'wfob_product_raw_data', function ( $raw_data, $product ) {
/**
* @var $product WC_Product
*/
$raw_data['regular_price'] = $product->get_regular_price();
$raw_data['price'] = $product->get_price();
return $raw_data;
@xlplugins
xlplugins / conditional-field.php
Last active April 14, 2022 13:55
Conditional field for Radio button in Aerocheckout
<?php
class WFACP_Conditional_field {
private $conditional_field = [];
public function __construct() {
$this->conditional_field = [
'user_type' => [
[
@xlplugins
xlplugins / conditional-field.php
Created February 21, 2020 07:54
snippet for conditional field in Aerocheckout
<?php
class WFACP_Conditional_field {
private $conditional_field = [];
public function __construct() {
$this->conditional_field = [
'business_delivery' => [
[
'value' => 'checked',
@xlplugins
xlplugins / virtual_and_simple_products_switch_aero_pages.php
Last active July 2, 2024 06:51
Switch Checkout pages for virtual and simple cart products
add_filter( 'wfacp_global_checkout_page_id', function ( $id ) {
$virtual_product_checkout_id=2930; // Make new checkout page for only virtual product and assign here
$non_virtual_product_checkout_id=2895; // Make a new checkout page for non virtual product and assign here
if ( 0 == $id || is_null( WC()->cart )) {
return $id;
}
$cart_count=WC()->cart->get_cart_contents_count();
if($cart_count > 1){