Add “Do Not Refresh” Text Below Checkout “Place Order” Button
Processing your order may take up to 1 minute. Please don’t close, leave or reload this page after placing your order.Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
Processing your order may take up to 1 minute. Please don’t close, leave or reload this page after placing your order.Continue reading
(function () { const fieldSelectors = [ ‘#billing_phone_field’, ‘#billing_company_field’, ‘#billing_address_1_field’, ‘#billing_address_2_field’, ‘#billing_city_field’, ‘#billing_postcode_field’, ‘#billing_state_field’, ‘#billing_country_field’ ]; const klaviyoSelectors = [ ‘#kl_newsletter_checkbox_field’, ‘#kl_sms_consent_checkbox_field’ ]; function setVisibility(selectors, show) { selectors.forEach(selector => { const el = document.querySelector(selector); if (el) { el.style.display = show…Continue reading
document.addEventListener(‘DOMContentLoaded’, function () { const observer = new MutationObserver(function () { const codeInput = document.querySelector(‘input[name=”cev_billing_email”]’); if (codeInput && !codeInput.hasAttribute(‘inputmode’)) { codeInput.setAttribute(‘inputmode’, ‘numeric’); } }); observer.observe(document.body, { childList: true, subtree: true }); });Continue reading
if ( ! function_exists( ‘rd_wc_subscription_renewal_coupon_locked_context’ ) ) { function rd_wc_subscription_renewal_coupon_locked_context(): bool { if ( is_admin() && ! wp_doing_ajax() ) { return false; } if ( ! function_exists( ‘WC’ ) ) { return false; } if ( function_exists( ‘wcs_cart_contains_renewal’ ) &&…Continue reading
if ( ! defined( ‘ABSPATH’ ) ) { return; } if ( ! class_exists( ‘WooCommerce’ ) || ! class_exists( ‘WC_Shipping_Zones’ ) ) { return; } if ( ! function_exists( ‘rd_get_order_shipping_zone_id’ ) ) { function rd_get_order_shipping_zone_id( $order ) { if (…Continue reading
(function () { var rdBigPostHelpText = ‘Enter your postcode in the field above to load available suburbs. Once loaded,’ + ‘ select the suburb-postcode combination from the list below.’; // Customise Postcode field description text here. var rdObserverStarted = false;…Continue reading
add_action( ‘wp_enqueue_scripts’, function() { // 1) Make sure WooCommerce’s checkout.js is loaded (so it will set up wc_checkout_params) if ( ! wp_script_is( ‘wc-checkout’, ‘enqueued’ ) ) { wp_enqueue_script( ‘wc-checkout’ ); } // 2) Then load *your* script *after* it, so…Continue reading
/** * Snippet Name: AJAX Coupon Handlers * Description: Handles apply/remove coupon via WC AJAX endpoints. * Execution: Run Everywhere (Front & Admin) * Priority: 10 */ // 1) APPLY COUPON via AJAX add_action( ‘wc_ajax_apply_coupon’, ‘wc_custom_apply_coupon_ajax’, 5 ); add_action( ‘wc_ajax_nopriv_apply_coupon’,…Continue reading
.readonly-field { background:#f2f2f2 !important; color:#666 !important; } /* ======================================== CHECKOUT BREADCRUMBS — Exact Styling Fix ======================================== */ .checkout-header h1 { font-size: 24px !important; } .checkout-header { font-size: 14px !important; } body.woocommerce-checkout .checkout-breadcrumb { display: flex; align-items: center; margin-bottom: 2rem; font-size:…Continue reading
/** * custom-checkout.js (canonical fields + live address refresh) * — Two-step navigation * — Ship-to-different handling via hidden input * — Address book modal (add/edit/delete) with instant UI refresh * — Address book integration on checkout * — Coupon…Continue reading