/** * Klovera Admin UI – Global * – Remove WooCommerce rating / marketing notices * – Replace admin footer with Klovera support message * – Optional: hide WordPress version text */ /** * 1) Remove WooCommerce admin notices (rating,…Continue reading
/** * Hide admin notices for non-admin roles */ add_action(‘admin_init’, function () { if (!current_user_can(‘administrator’)) { remove_all_actions(‘admin_notices’); remove_all_actions(‘all_admin_notices’); } });Continue reading
/** * Print Portals – Left Sidebar Menu (v3) * * – Shows for ALL users. * – Orders + Address Book: * – Logged out => /login * – Logged in => /orders, /address-book * – Bottom button: *…Continue reading
/** * Your Orders (AJAX Grid + Viewer) + Optional Approvals + Custom Emails + Custom Thank You * + Friendly /orders/{order-number} + AJAX pagination (50 per page) with NO page refresh * * Shortcodes: * [your_orders] * * IMPORTANT:…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
/** * Address Book – Main PHP (safe-merge + defaults-in-JSON) */ /* ——————————— 1) Enqueue scripts & styles ———————————–*/ add_action(‘wp_enqueue_scripts’, function() { wp_enqueue_script( ‘address-book-js’, get_stylesheet_directory_uri() . ‘/js/address-book.js’, [‘jquery’], ‘1.1’, true ); wp_localize_script(‘address-book-js’,’addressBookParams’,[ ‘ajax_url’ => admin_url(‘admin-ajax.php’), ‘nonce’ => wp_create_nonce(‘address_book_nonce’), ]); wp_enqueue_style(…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
// ====================================================== // Custom 2-Step Checkout (guest gating + autofill guards) // + Step 1 Review Items (AJAX remove) — FULL FILE // // Includes: // – Guest: billing_email shown in Delivery > New Address only // – Guest: can…Continue reading