You can create a helper function for that which qurries the orders for given email and created less than 10 mins ago.
function wpse407278_check_if_ordered_in_last_10_mins( $email ) {
if ( !isset($email) || empty($email) ) {
return false;
}
$args = array(
'customer' => $email,
'date_created' => '>' . ( time() - strtotime('-10 minutes') ),
);
$orders = wc_get_orders( $args );
if ( empty( $orders ) ) {
return false;
}
return true;
}
This will return true
if the customer has orderd within last 10 minutes and false
otherwise.
Related Posts:
- Username field is not shown in Woocommerce’s registration contact form
- Custom Redirect after registration in WooCommerce
- Which hook should I use to capture $_POST(‘password’) via profile update and password reset
- Force User Registration before visitng Checkout Page
- Register a new user on wooCommerce using Rest API
- Allow WooCommerce existing customers to checkout without being logged in [closed]
- WooCommerce: “account is already registered with your email address”
- Auto generate user email while registration
- Sender e-mail address, for new order email to customer, is suddenly wrong [closed]
- WooCommerce Registration redirect based on page ID
- Block Disposable Emails on Woocommerce Registration
- Clients with empty username are not receiving request new password email
- Woocommerce Register Error
- Make e-Mail optional on Woocommerce sign up
- Assign user role by text field in WordPress (Woocommerce) [closed]
- Impossible to create a new WooCommerce customer using Rest API
- Registration roles
- How to send Woocommerce Customer Details (Name, Email and Phone Number) to Admin upon signup
- Redirect After Registration on Specific Link
- Custom Registration Fields woocommerce
- Allow users to register on multisite through WooCommerce using the same email address
- Change WooCommerce registration form/way?
- DatePicker in Woocommerce (My Account) Registration [closed]
- Remove login fields from /customer-account page [closed]
- Woocommerce: show default variation price is products list?
- Woocommerce checkout fields on the same line
- display available size on hover, in woocommerce shop page [closed]
- How to Add Product Variation with Multiple Images via WooCommerce REST API
- WooCommerce: Email Notifications
- WooCommerce: Adding Order Item Meta Data That’s Hidden
- Redirect user after login through woocommerce login page to page with his/her username?
- WooCommerce restore stock on order cancel
- Woocoomerce product category count including subcategories
- WordPress select field – show current value?
- Get the category ID in checkout page woocomerce
- “Cannot read property ‘replace’ of undefined” Javascript error when trying to add attribute terms from add product page [closed]
- WooCommerce product taxonomies and menu export
- user_register not triggering with email verification
- Javascript / Ajax Error After Migrating To New Domain Name
- How can i stop woocommerce checkout event based on api request result?
- WordPress Twenty Seventeen header image size not responsive for mobile
- WooCommerce back-end very slow takes 10 seconds to load, slow queries
- Woocommerce custom meta fields, sort by date
- jquery.validation.js is not working in woocommerce checkout page form
- Backend users list – add Woocommerce meta to table
- Delete cookie when changing url (when navigating away from specific page of website)
- multi-vender wooCommerce ability to separate products based on zip code [closed]
- I want to run a script only once on a ‘thank you’ page
- search customers in front end by billing data
- update_post_meta not work [closed]
- How to set a default value in a meta box
- Can I have one picture for all sizes in a product with Woocommerce?
- how do i remove a woo-commerce widget?
- How can I convert woocommerce checkout fields in capital letters
- main menu hide woo commerce single products tittle
- Order by date on category dynamically – Woocommerce
- Woocomnerce Limit Purchase value before proceed checkout
- Add to cart – button should be disabled
- How To Customize The Product Page Template for a WooCommerce Custom Product Type Plugin [closed]
- Hide Add to Cart button on woocommerce Product description page of a particular product
- Add only sku to product url woocoomerce
- What is better way to sync wp multisite woocommerce products
- Remove required from a custom field created from WooCommerce Checkout Field Editor plugin
- How to change status of woocommerce orders when post status is changed
- manage_shop_order_posts_custom_column() hook is Not working In Functions.php file in my WordPress active theme
- How to send woocommerce emails in multiple languages
- WooCommerce – Child Category wont show, but Parent does
- WooCommerce Simple Auctions add username to auction finished email
- Enable Gutenberg for Woocommerce
- How to hide a random text with a div tag using a class on product pages with a specific tag
- Missing variable options on add to cart form
- Woocommerce digital download not working – database error Cannot add or update a child row: a foreign key constraint fails [closed]
- when product out of stock single page show button notify woo-commerce
- WooCommerce , Auto cancel orders status from processing after X days
- Change WooCommerce Word “Product” to Another Word
- How does a WooCommerce site integrate with the existing real world customer members?
- Recently viewed products – Order by viewed
- How can i add product Accessories from front-end using custom php form?
- How to save order item custom attributes save into custom table
- Manually create an order with a product ID woocommerce
- How to filter result set in custom metaboxes?
- WooCommerce subscriptions give option of manual renewal on checkout [closed]
- How to hide / remove duplicated Woocommerce products from Shop page
- Change order status after checkout
- Is it safe to update an old site after backing it up and activating a child theme?
- Disable Woocommerce main shop page, but not the product category archive pages
- access Woo commerce | WordPress methods externally
- How to store ACF from product in user_meta?
- Woocommerce set single city to sell to
- Trying to link to a custom css file in a new folder
- How do I make a diagonal strikethrough on wordpress? [closed]
- Woocommerce – Remove ‘Buy Product’ Button from shop page [closed]
- Add woocommerce.css in template?
- registration_errors not working
- Translate Woocommerce tab
- Woocommerce -> gallery images per variation without a plugin? [closed]
- Why is my WordPress admin not working
- Create bookings after subscription renewal
- Change variants URL
- Use a woocommerce hook to create a table and populate it with a query