/** * 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: Show weld & dress estimate on single product pages for “-weld” roles. * * Purpose: * Displays an ex-GST weld fee estimate message on applicable single product pages. * This is display-only and does not add any…Continue reading
/** * 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
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
/** * Only load WooCommerce legacy CSS on core Woo pages. * Helps reduce render-blocking CSS on normal pages (home, blog, etc). */ add_filter( ‘woocommerce_enqueue_styles’, function( $styles ) { // Keep everything on core Woo pages. if ( is_woocommerce() ||…Continue reading
/** * Nuke TT4 / WP webfonts (Inter & Cardo) from the front end. */ // 1. Stop TT4’s own preload / font-face helper (safety, but not relied on). add_action( ‘after_setup_theme’, function () { remove_action( ‘wp_head’, ‘twentytwentyfour_preload_webfonts’ ); }, 20…Continue reading
add_action(‘wp_head’, function () { if ( ! is_front_page() ) return; $attachment_id = 6598; //Continue reading
// Add opt-in checkbox at checkout (after billing fields) add_action(‘woocommerce_after_checkout_billing_form’, ‘upl_add_newsletter_opt_in_checkbox’, 10); function upl_add_newsletter_opt_in_checkbox($checkout) { woocommerce_form_field(‘subscribe_to_newsletter’, array( ‘type’ => ‘checkbox’, ‘class’ => array(‘form-row-wide’), ‘label’ => __(‘Yes, I want to subscribe to your newsletter’), ‘required’ => false, ), $checkout->get_value(‘subscribe_to_newsletter’)); } //…Continue reading
/* ============================================================ PCBoost Twin Merge v2.8 (WPCode snippet — PHP, Run Everywhere) INSTALL: paste over the WHOLE code of snippet 145988 (same snippet, Update), together with Delivery lead times v1.6 (191496). Never run two Twin Merge versions side by side…Continue reading