Archives: Snippets
WWPP – Customize the admin “New Order” email subject for wholesalers v1.1
/** * Customize the Admin “New Order” email subject using Wholesale Prices Premium logic */ add_filter( ‘woocommerce_email_subject_new_order’, function( $subject, $order ) { if ( ! $order ) { return $subject; } // Access the Wholesale Prices Premium global object global…Continue reading
WWPP – Customize the admin “New Order” email subject for wholesalers
/** * Customize the Admin “New Order” email subject for wholesale customers only */ add_filter( ‘woocommerce_email_subject_new_order’, function( $subject, $order ) { if ( ! $order ) { return $subject; } $customer_id = $order->get_customer_id(); if ( ! $customer_id ) { return…Continue reading
Untitled Snippet
Flodesk Popup #2
Flodesk Popup
Single Line Form adjustments
/* Input fields styling */ #wpforms-758 .wpforms-field input[type=”text”], #wpforms-758 .wpforms-field input[type=”email”] { background-color: #1c355e !important; border: 1px solid #ffffff !important; border-radius: 3px !important; color: #ffffff !important; } /* Placeholder text color */ #wpforms-758 .wpforms-field input[type=”text”]::placeholder, #wpforms-758 .wpforms-field input[type=”email”]::placeholder { color:…Continue reading
WWPP – Restrict add-to-cart on specific products to a specific wholesale role only
// 1. Make the product unpurchasable for non-doctors add_filter( ‘woocommerce_is_purchasable’, ‘wws_restrict_purchase_for_doctors’, 10, 2 ); function wws_restrict_purchase_for_doctors( $is_purchasable, $product ) { $allowed_role = ‘doctors’; $restricted_category = ‘doctors-only’; $product_id = $product->is_type( ‘variation’ ) ? $product->get_parent_id() : $product->get_id(); if ( has_term( $restricted_category, ‘product_cat’,…Continue reading
WWPP – Restrict add-to-cart on specific products to a specific wholesale role only
/** * Restrict add-to-cart on specific products to the ‘doctors’ wholesale role only. * * Usage: * 1. Set DOCTORS_ROLE_SLUG below to match the wholesale role slug you created in * WooCommerce > Wholesale Roles. * 2. On each product’s…Continue reading
KinTech template
KinTech Cybersecurity Solutions KT KINTECH Services Why Us Process Contact Get Audit Trusted Cybersecurity Partner DEFEND YOUR DIGITAL WORLD KinTech Cybersecurity Solutions delivers expert penetration testing, vulnerability assessments, and ISO 27001-aligned security strategies — protecting businesses before attackers find the…Continue reading