Jump to content

Lashmar Media

New Member
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Lashmar Media

  1. Hey all, I have been suffering with this issue and think I have found a solution: After trying everything I still was getting round 75 fake order but tried this method of having the client first validate their email before placing the order. Here is the hook if you want to give it a try: Step 1: Enable Email Verification Log in to your WHMCS Admin Area. Go to Configuration (Cog Icon) > System Settings > Security. Find the setting "Enable Email Verification". Tick the box to enable it. Click Save Changes at the bottom. ✅ This will send a verification link to the user’s email after they register. ✅ Step 2: Prevent Ordering Until Email Is Verified WHMCS does not natively block unverified users from ordering. You need to modify the cart behavior using a hook. ⚠️ How to Add a Custom Hook to Block Orders from Unverified Accounts: Access your WHMCS Files via FTP or File Manager in cPanel. Navigate to: /includes/hooks/ Create a new file, e.g., blockUnverifiedOrders.php Paste the following code inside that file: php CopyEdit <?php use WHMCS\Database\Capsule; add_hook('ShoppingCartValidateCheckout', 1, function($vars) { $client = Menu::context('client'); if ($client && !$client->emailVerified) { return 'You must verify your email before you can place an order. Please check your email for the verification link.'; } }); Save the file. ✅ This stops the checkout with a message if the client’s email is not verified.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated