Archives: Snippets
WWPP – Hide Tax label on Cart/Checkout for wholesale customers
add_filter( ‘woocommerce_countries_tax_or_vat’, function( $label ) { if ( ! ( is_cart() || is_checkout() ) ) { return $label; } global $wc_wholesale_prices_premium; $user_wholesale_role = $wc_wholesale_prices_premium->wwpp_wholesale_roles->getUserWholesaleRole(); if ( empty( $user_wholesale_role ) ) { return $label; } return ”; // Leave blank, or…Continue reading
Untitled Snippet
Untitled Snippet
Untitled Snippet
GTM Body
GTM Head
WWPP & Elementor – Show correct wholesale prices in the Elementor side cart
/** * WWPP & Elementor: show correct wholesale prices in Elementor side cart. */ add_filter( ‘woocommerce_cart_item_price’, function ( $price_html, $cart_item, $cart_item_key ) { if ( is_cart() || is_checkout() ) { return $price_html; } global $wc_wholesale_prices_premium, $wc_wholesale_prices; if ( ! isset(…Continue reading
WWLC – Route logout through home URL to prevent exposing the hidden login path
/** * Route logout through home URL to prevent exposing the hidden login path. */ add_filter( ‘logout_url’, function ( $logout_url, $redirect ) { $redirect_to = $redirect ?: home_url( ‘/’ ); return add_query_arg( [ ‘do_logout’ => ‘1’, ‘_wpnonce’ => wp_create_nonce( ‘safe-logout’…Continue reading
Test
echo “test”;Continue reading