Checkout – Add class when Windcave is not available

/** * UNITED PRODUCTS – CHECKOUT CLASS WHEN WINDCAVE NOT AVAILABLE * ———————————————————– * * Adds a body class when Windcave is NOT available. * Uses a later hook so WooCommerce gateways are loaded. */ add_filter( ‘body_class’, function( $classes )…Continue reading

Wholesale – No Discount Products

/** * Wholesale – No discount on tagged products * * Products tagged “no-discount” always sell at regular price * for wholesale users, regardless of role discount. * Supports simple products and variations. */ if ( ! function_exists( ‘upl_nd3_is_wholesale_user’ )…Continue reading

Wholesale – Catalog Weld Note (-weld roles)

/** * UNITED PRODUCTS – WHOLESALE CATALOG WELD NOTE * ——————————————— * Shows “Weld & dress added in cart” on archive/catalog/category pages * for logged-in wholesale users whose role contains “-weld”. * * Purpose: * – Gives weld-role customers context…Continue reading

Wholesale – Weld & dress cart fee (by blade width)

/** * Wholesale: Cart weld fee for -weld roles (grouped by blade width) — TAXABLE */ if ( ! function_exists(‘up_user_has_weld_role’) ) { function up_user_has_weld_role(): bool { if ( ! is_user_logged_in() ) return false; $user = wp_get_current_user(); foreach ( (array) $user->roles…Continue reading

Hero LCP Image Priority (Front Page)

add_filter(‘wp_get_attachment_image_attributes’, function ($attr, $attachment, $size) { if ( ! is_front_page() ) return $attr; // Hero background image (ID 6598) if ( isset($attachment->ID) && (int) $attachment->ID === 6598 ) { $attr[‘loading’] = ‘eager’; $attr[‘fetchpriority’] = ‘high’; $attr[‘decoding’] = ‘async’; } return…Continue reading