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