• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Checkout
  • Cart
  • Videos

Restrict Product Purchase At Checkout by Email Address in WooCommerce

$75.00

Demo Video
Category: WooCommerce Tag: woocommerce_after_checkout_validation
  • Description

This code adds conditional order restrictions at checkout so only customers with specific email addresses can purchase a specific product. If the customers billing email address doesn’t match, they cannot complete the purchase and a customizable notice is displayed like this :

The code enables the store owner to restrict customers from checkout by :

  • Specific product ids
  • Unlimited billing email addresses

Installation

Install as a new plugin or copy & paste the PHP code to the end of your child themes functions file or custom functionality plugin.

Swap out the product ID on line 17 and 26.

Swap out a comma separated list of email addresses on line 44.

Primary Sidebar

Cart

Code written by Brad Dalton specialist for WooCommerce with more than 10 years of experience.

Advertise · WPEngine · Genesis · Log in

  • Code Snippets
  • Tutorials
  • Videos
  • Account
  • Checkout
  • Cart
 

Loading Comments...
 

You must be logged in to post a comment.