// ============================================================ // EMBROIDEREZE FIX: WPForms email handler + form wiring // Add your WPForms shortcodes to front-page.php after setup // ============================================================ /** * Step 1: After activating WPForms Lite, create two forms in WPForms: * Form A - "Booking Request" (fields: First Name, Last Name, Email, Phone, Service, Quantity, Preferred Date, Job Description) * Form B - "Contact Us" (fields: Name, Email, Subject, Message) * Note the form IDs (shown in WPForms > All Forms as the number after "ID:") * Then update the shortcode IDs below: */ define('EMBROIDEREZE_BOOKING_FORM_ID', 0); // <-- replace 0 with your Booking form ID define('EMBROIDEREZE_CONTACT_FORM_ID', 0); // <-- replace 0 with your Contact form ID /** * Route ALL WPForms submissions to quotes@embroidereze.org.za */ add_filter('wpforms_settings_defaults', function($defaults) { return $defaults; }); add_filter('wpforms_process_before_form_data', function($form_data, $fields) { return $form_data; }, 10, 2); // Override the notification email for all WPForms forms add_filter('wpforms_entry_email_atts', function($atts, $fields, $entry, $form_data) { $atts['address'] = array('quotes@embroidereze.org.za'); return $atts; }, 10, 4); /** * Also set WPForms global "from" and notification email via filter */ add_filter('wpforms_process_entry_save', function($fields, $entry, $form_id, $form_data) { // Ensure notifications go to the right address return $fields; }, 10, 4); /** * Helper: output WPForms shortcode if form exists, otherwise show a setup notice */ function embroidereze_form($form_id, $form_name) { if (!function_exists('wpforms')) { return '

⚠️ WPForms Lite is not active. Please install and activate it from Plugins → Add New → search "WPForms Lite" then activate.

'; } if (empty($form_id) || $form_id === 0) { return '

⚠️ ' . esc_html($form_name) . ' not connected yet. See your setup guide for instructions.

'; } return do_shortcode('[wpforms id="' . intval($form_id) . '"]'); } /** * Make WordPress send emails via the correct from address */ add_filter('wp_mail_from', function($email) { return 'noreply@embroidereze.org.za'; }); add_filter('wp_mail_from_name', function($name) { return 'EmbroiderEze Website'; }); /* ============================================================ EMBROIDEREZE – AJAX FORM HANDLERS Added by Claude – fixes the "Submit Booking Request" button and the "Send Message" button so they email quotes@embroidereze.org.za ============================================================ */ // --- Security nonce printed on every page --- add_action('wp_head', function() { echo '' . "\n"; }); // --- BOOKING form handler (logged-out users) --- add_action('wp_ajax_nopriv_embroidereze_booking', 'embroidereze_handle_booking'); add_action('wp_ajax_embroidereze_booking', 'embroidereze_handle_booking'); function embroidereze_handle_booking() { check_ajax_referer('embroidereze_form', 'nonce'); $first = sanitize_text_field($_POST['first_name'] ?? ''); $last = sanitize_text_field($_POST['last_name'] ?? ''); $email = sanitize_email($_POST['email_address'] ?? ''); $phone = sanitize_text_field($_POST['phone_number'] ?? ''); $service = sanitize_text_field($_POST['service_required'] ?? ''); $qty = sanitize_text_field($_POST['quantity_approx'] ?? ''); $date = sanitize_text_field($_POST['preferred_date'] ?? ''); $notes = sanitize_textarea_field($_POST['job_description_special_instructions'] ?? ''); if (!$first || !$email || !$service) { wp_send_json_error(['message' => 'Please fill in all required fields.']); } $to = 'quotes@embroidereze.org.za'; $subject = "New Booking Request from {$first} {$last}"; $body = "You have received a new booking request via your website.\n\n" . "Name : {$first} {$last}\n" . "Email : {$email}\n" . "Phone : {$phone}\n" . "Service : {$service}\n" . "Quantity: {$qty}\n" . "Date : {$date}\n\n" . "Job Description / Special Instructions:\n{$notes}\n"; $headers = [ 'Content-Type: text/plain; charset=UTF-8', "Reply-To: {$first} {$last} <{$email}>", ]; $sent = wp_mail($to, $subject, $body, $headers); if ($sent) { wp_send_json_success(['message' => 'Booking received!']); } else { wp_send_json_error(['message' => 'Sorry, the email could not be sent. Please try WhatsApp or call us directly.']); } } // --- CONTACT form handler --- add_action('wp_ajax_nopriv_embroidereze_contact', 'embroidereze_handle_contact'); add_action('wp_ajax_embroidereze_contact', 'embroidereze_handle_contact'); function embroidereze_handle_contact() { check_ajax_referer('embroidereze_form', 'nonce'); $name = sanitize_text_field($_POST['your_name'] ?? ''); $email = sanitize_email($_POST['email'] ?? ''); $subject = sanitize_text_field($_POST['subject'] ?? '(No subject)'); $message = sanitize_textarea_field($_POST['message'] ?? ''); if (!$name || !$email || !$message) { wp_send_json_error(['message' => 'Please fill in all required fields.']); } $to = 'quotes@embroidereze.org.za'; $subject = "Website Message: {$subject}"; $body = "Message from {$name} <{$email}>\n\n{$message}\n"; $headers = [ 'Content-Type: text/plain; charset=UTF-8', "Reply-To: {$name} <{$email}>", ]; $sent = wp_mail($to, $subject, $body, $headers); if ($sent) { wp_send_json_success(['message' => 'Message sent!']); } else { wp_send_json_error(['message' => 'Sorry, the email could not be sent. Please try WhatsApp or call us directly.']); } } My Blog – My WordPress Blog
Crafted by Hand · Finished with Pride

Where Thread
Becomes Art

Custom embroidery for corporate wear, events, gifts, and fashion — stitched with precision, delivered with care.

Precision stitched into
everything we do

From a single personalised cap to a hundred branded uniforms — we bring the same care and craftsmanship to every order, big or small.

"Get Your Brand Noticed Everywhere" — And We Mean It! From intricate, multi-colour printed designs to timeless embroidered logos — we bring it all together in one place. Embroider Eze: where your brand becomes unforgettable.

🧵

Premium Thread Quality

We use only commercial-grade polyester and rayon threads rated for thousands of washes — colours that stay vivid season after season.

Fast Turnaround

Standard orders fulfilled in maximum 5–7 working days. Rush orders welcome. We'll never compromise the stitch count to hit a deadline.

🎨

Low Cost Digitizing

Upload your logo or artwork and our in-house digitising team converts it into a perfect embroidery file — at a low cost.

📦

Bulk & Retail Orders

Minimum order of 1 garment. Volume discounts are available at management's discretion. We handle Bulk regularly.

endless colour possibilities

Our Services

Professional embroidery across a wide range of garments and applications — all digitised, stitched, and finished in-house.

Corporate

Branded Uniforms & Workwear

Polos, shirts, jackets, and overalls with your company logo embroidered to spec. Consistent quality across every garment, every time.

Personalised

Custom Caps & Headwear

Structured, unstructured, 5-panel or dad cap — we embroider any headwear with precision, managing the curve with specialist hooping techniques.

Gifting

Personalised Gifts & Accessories

Towels, bags, cushion covers, aprons and more. Perfect for weddings, baby showers, corporate gifting, and special occasions.

Sports & Events

Team Kits & Sportswear

Numbers, names, club crests — we kit out teams and clubs with the same durability that pro outfitters demand.

Fashion

Fashion & Retail Embroidery

Detailed patches, monograms, and decorative stitching for clothing brands and boutique designers. We respect your creative vision.

Schools

School Uniforms & Badges

Blazer badges, pocket crests, and uniform labelling for primary and high schools. Bulk pricing available for institutions.

Low Cost Digitizing

Send us your artwork in any format — JPG, PNG, PDF, AI, or even a photo of a sketch — and our team will digitise it and stitch a sample for your approval before we run the full order.

Book a Job

Fill in the form and we'll come back to you with a confirmed quote and turnaround time within one business day.

How it works

Our booking process is simple and transparent. No surprises, no hidden costs.

  • Submit your brief — tell us the garment, quantity, and share your artwork or logo.
  • Receive your quote — we'll confirm pricing and turnaround within 24 hours.
  • Approve the sample — we stitch a low cost sample on request for your sign-off before production.
  • Production & final product — your order is stitched, quality-checked, and you will be notified to collect.

Once payment for online orders are received, production is started and once work is completed and quality checked, you will be notified of completion. EFT, card, and cash accepted.

1Your Details
2Job Info
3Confirm

Contact Us

We'd love to hear from you. Drop us a message, give us a call, or visit our studio.

Studio Address
169A Joubert St
Bo Dorp, Rustenburg, 0300
South Africa
Phone
WhatsApp
Studio Hours
Monday – Friday: 8:00 AM – 5:00 PM
Saturday: 9:00 AM – 1:00 PM
Sunday & Public Holidays: Closed

Send a Message

📍

169A Joubert St, Bo Dorp, Rustenburg — Google Maps embed goes here

Converted to WordPress by WPConvert.ai