Allow Order Processor into WooCommerce Orders Tanya

/** * Identify Tanya’s exact Order Processor account. */ function united_products_is_tanya_order_processor() { $user = wp_get_current_user(); return ( $user instanceof WP_User && ‘Tanya_Markova’ === $user->user_login && in_array( ‘order_processing’, (array) $user->roles, true ) ); } /** * Send Tanya directly to business…Continue reading

Google Customer Reviews Survey Opt-in V2

/* |————————————————————————– | Google Customer Reviews Survey Opt-In v2 |————————————————————————– | | Displays the Google Customer Reviews survey opt-in on the WooCommerce order confirmation page using Google’s gapi.surveyoptin.render() integration. | |Delivery estimation: | |* North Island (postcodes 0–6): 1 business…Continue reading

NZ Checkout Address Labels (Suburb / Town & City)

/** * ============================================================================ * Snippet: NZ Checkout Address Labels (Suburb / Town & City) * ============================================================================ * * Purpose * ——- * Changes the New Zealand WooCommerce checkout address labels to better suit * New Zealand addressing and improve compatibility…Continue reading

Diagnostic – List Frontend Script Handles

// TEMP DIAGNOSTIC – lists frontend JavaScript handles. // Only runs when ?up_script_debug=1 is added to the URL. // Remove or deactivate after testing. add_action( ‘wp_print_scripts’, function() { if ( is_admin() || ! current_user_can( ‘manage_options’ ) ) { return; }…Continue reading

Enable Categories on Pages (Article Grouping)

/** * Enable WordPress Categories on Pages * * Allows standard post categories to be used on Pages. * This lets article-style pages be grouped (e.g. Blade Selection, Problems, Metal Cutting) * and enables structured internal linking and query loops.…Continue reading

Wholesale GST + Unit Display Combined

/** * UNITED PRODUCTS – WHOLESALE GST + UNIT DISPLAY COMBINED * ——————————————————- * Shows: * – Excluding GST * – Price per metre / Each * * On: * – Single product pages * – Archive/category/shop product cards *…Continue reading