Category: eCommerce
Remove the “Apply to become a vendor” checkbox from the WooCommerce default customer signup form
/** * Remove WC Vendors “Apply to become a vendor” checkbox from the WooCommerce default customer signup form. */ add_action( ‘init’, ‘wcv_remove_vendor_registration_checkbox’, 99 ); function wcv_remove_vendor_registration_checkbox() { global $wp_filter; $hook = ‘woocommerce_register_form’; if ( isset( $wp_filter[ $hook ] ) )…Continue reading
Untitled Snippet
document.addEventListener(“click”, (e) => { const pill = e.target.closest(“.rs-pill”); if (!pill) return; const row = pill.parentElement; row.querySelectorAll(“.rs-pill”).forEach(p => p.classList.remove(“active”)); pill.classList.add(“active”); });Continue reading
header (copy)
header
Replace APFWS Matching Product Notice
(function () { if (typeof window === ‘undefined’ || !document) return; // Exit if WooCommerce frontend scripts are not present. if (typeof window.wc_add_to_cart_params === ‘undefined’) return; // Exit if WooCommerce APFS is not present (guards by checking for its AJAX…Continue reading
enamad-meta
Force “Become a Vendor” to always go to /my-account/become-a-vendor/
/** * Force “Become a Vendor” to always go to * /my-account/become-a-vendor/ * * Applies to BOTH Free and Pro versions. * Only affects users who are NOT vendor or pending-vendor. */ function custom_become_vendor_url_override( $url, $endpoint, $value, $permalink ) {…Continue reading
RewardsWP — My Account Rewards Tab
/** * Plugin Name: RewardsWP — My Account Rewards Tab * Description: Adds a “My Rewards” tab to WooCommerce My Account that opens the rewards widget. * Version: 1.0.0 * Author: AffiliateWP */ if ( ! defined( ‘ABSPATH’ ) )…Continue reading
Remove the coupon section for orders that did not use any coupon.
add_action( ‘woocommerce_email_before_order_table’, ‘conditionally_remove_coupon_section_from_email’, 5, 4 ); function conditionally_remove_coupon_section_from_email( $order, $sent_to_admin, $plain_text, $email ) { if ( ! $order instanceof WC_Order ) { return; } // Get applied coupons $coupons = $order->get_coupon_codes(); // If NO coupons were used, remove the coupon…Continue reading