You can load the WP environment in order to verify the user’s login. Have a look at these previous answers:
https://stackoverflow.com/questions/15304926/how-to-include-wordpress-functions-in-custom-php-file
https://stackoverflow.com/questions/47251705/load-wordpress-page-content-from-external-php
Include WP_Query in my own PHP file?
You might also find it helpful to add define('WP_USE_THEMES', false);
to stop WP from loading the theme, etc, if it’s not needed in your php script.
Related Posts:
- Remember page before login page, redirect to that page after login
- Woocommerce Login Redirect not working [closed]
- Redirect user after login through woocommerce login page to page with his/her username?
- Woocommerce login not working on the first try
- Woocommerce Login Redirect to old domain
- wordpress/woocommerce login url not redirecting correctly
- Anonymous users can not access website
- How to change redirect code? [duplicate]
- Login page so wide [closed]
- Remove login fields from /customer-account page [closed]
- Getting the gallery images from products in woocommerce?
- add_filter to modify woocommerce_cart_item_name hyperlink
- Get product details by url key in WordPress woocommerce
- How to get rid of the hover zoom in WooCommerce single products
- How do I display certain products via their category on a section of a page using PHP?
- Where is the “default attribute” values located in the phpMyAdmin in Woocommerce?
- pre_get_posts with WooCommerce Shortcode Query
- Reverse engineering of WooCommerce Storefront filters
- Use WooCommerce function in other WordPress plugin
- WooCommerce – update order item price and recalculate totals
- Add product description (content) to WooCommerce customer processing order email
- woocommerce – get_image_size() deprecated [closed]
- Adding product SKU before cart item name in WooCommerce
- Woocommerce: How to remove page title from storefront theme homepage
- Remove checkout fields with Woocommerce depending on one of several shipping methods
- Replace one coupon to another after coupon added
- WooCommerce Multi-Currency shortcode not working
- Filter WooCommerce Orders query with user meta data
- Avada & WooCommerce Customization – Replacing product_title in woo-config.php [closed]
- How to unset fields in woocommerce product quick edit?
- rating, share and review issue for single WooCommerce page
- Delete All Product Images in phpmyadmin
- WooCommerce template page for category
- Custom PLU field in woocommerce email
- Change how the Subtotal Price in cart being calculated [closed]
- Display Advanced Custom Fields value in Woocommerce admin order details
- Some images aren’t shown on wordpress after installation on host
- Show only one variaton in catalog on meta key
- WordPress & WooCommerce: Localhost, Staging and production environments and how to sync them without losing data
- PayPal Express on product page in WooCommerce – doesn’t seem to work on product page?
- Woocommerce – Want to block a user agent from accessing specific product pages
- Reset all stock status in woocommerce
- Additional fields on Woocommerce’s rating system
- Best Practice – Customise a WooCommerce+WordPress Templates
- Woocommerce product image [closed]
- Question on WooCommerce Syntax
- Tax are not showing on order while placing order with REST API
- woocommerce_new_product action doesn’t fire
- Change The Woocommerce Product Categories Dropdown Widget Placeholder Text
- WooCommerce adding product to cart programatically [closed]
- minimum order item for certain products exempting 2 other products (in bulk)
- Is it possible to checkout with 2 different shipping options on a single order? [closed]
- Sender e-mail address, for new order email to customer, is suddenly wrong [closed]
- Pass class to Woocommerce shortcode [relative_products] [closed]
- Undo WooCommerce CSV import
- A Woo commerce extension has deleted my old theme.How to undo? [closed]
- Simple Product not displaying in frontend
- Woocommerce Advanced Shipping (WAS) condition is not being called when selecting “Ship to different address” [closed]
- Strip string from $_product->get_title() to get a cleaner mini-cart
- WooCommerce Meta
- WooCommerce Product Table Conditional styling
- Product page attributes dropdown show price
- Smart Design for Blog + Woocommerce + LearnDash + Forum/Bodyboss
- Ajax add to cart not updating Elementor mini cart totals
- I want to store user password (during registration) in an other table in the same database in addition to the user table MD5 Hash
- How to edit the default woo-commerce Store page meta title tag “Products”
- What is the problem with these lines of code?
- Dynamic product total add to cart amount
- How can I make a thumbnail slider
- WooCommerce – 500k Jump in Order Number?
- How to show specific admin menu to specific user role?
- Need help with woocommerce roles
- Change WooCommerce product and variation prices programatically without affecting performance
- Help to locate a woocommerce hook method
- woocommerce_product_quick_edit_save hook not fired
- I can’t add pictures to the product attribute item in woocommerce
- Can I use taxonomies to make a multistore with woocommerce?
- Why does wc_get_products($arg) return no products when $arg = ‘average_rating’ => 5.0
- Query product’s image path by category WooCommerce database?
- woocommerce_sessions – Table does not exist
- How update price for variable product
- currentURL is not defined
- Woocommerce add 15% discount to a product if quantity is greater than or equal to 6
- Related products based on keywords
- Add button linked to single product page on order detail page
- Hide add to cart when product variation has no price or is unavailable
- How to get the WooCommercer product variation image
- how add css class to product boxes li, for img, add cart button, decs, price… [closed]
- How can I hide the entire “Shipping Details” block on the admin side of Woocommerce? [closed]
- How do I put woocommerce cart page to my checkout page? [closed]
- Decrease stock quantity when a variation is sold using Woocommerce
- WooCommerce show decimals in totals [closed]
- CSS url rules not relative to css path in account endpoint areas. IE. subscriptions
- Send data to external websites when there is an update or create a post
- Add a custom code with custom link after add to cart for every product
- WooCommerce product permalink based on product’s current category
- Disable duplicate WC product category URLs
- how should i get products based on tags in woocommerce
- Add custom text to product category page
- Woocommerce permalink URL change in DB