You can try and use the WC session:
Documentation URL:
https://docs.woocommerce.com/wc-apidocs/class-WC_Session.html
StackOverflow discussion.
https://stackoverflow.com/questions/27199656/how-to-use-session-in-woocommerce-pages-like-we-use-normal-php-session
And once you get to the Thank you page you’ll destroy it.
Haven’t tried it yet by coding it but that should work.
Related Posts:
- Redirect no product url’s to static url
- Woocommerce permalink URL change in DB
- Get the product list of a given Category ID
- get woocommerce My account page link
- Where do the cart details are stored in database?
- Fetch Product information in WooCommerce
- New endpoint in my account gives 404 Error Woocommerce 3.6.5 and WP 5.2.2
- Add Custom CSS to Woocommerce Product Page in a specified category
- In WooCommerce filter the available Payment Methods by User Role [closed]
- Add Additional “Checkout” button next to “Add to cart” button in woocommerce product page
- wc_get_product in a none woocommerce page
- WP WPQuery, not running properly in WP CLI
- How to get all products from an order including variations via SQL query?
- How to echo billing phone number under My Account in Woocommerce? [closed]
- Unknow php file in wordpress core [closed]
- woocommerce_get_price filter hook not working for product variation price
- WooCommerce shipping – Different product different shipping? [closed]
- Remove action added through function
- Filter get_adjacent_post to follow woocommerce product category
- Run function on “Place Order” [closed]
- Woocommerce SKU on ALL products page [closed]
- Stop WooCommerce from updating user/user meta after checkout
- Displaying Custom Input Value to Customer Order Details (My Account) page in Woocommerce
- Woo API REST : product variation price is read-only?
- Get rid of product images mobile swipe functionality from WooCommerce single product [closed]
- Add custom order meta to Order Completed email
- Hiding products with a specific tag from WooCommerce main shop page
- How to upload Woocommerce product images via API? [closed]
- how to do a processing Orders into Complete after x Minutes or x hour in WooCommerce [closed]
- show content of a page built using yootheme builder on different page/template
- How to detect if this post is a woocommerce product?
- Set a custom field to all orders
- Force User Registration before visitng Checkout Page
- Tax Query for custom Taxonomy field
- Improve WooCommerce checkout process [closed]
- How can I put the contents of My Account > Order into a separate page, Woocommerce
- Do I need a different product type for WooCommerce [closed]
- Feed format for woocommerce [closed]
- Convert WordPress Woocomerce product to WordPress post
- WooCommerce Hook: Content get’s displayed twice and not AFTER the order total
- Have I got this IF Statement correct?
- Setting an attribute as variation in woo commerce via php [duplicate]
- WooCommerce Price Filter not working? [closed]
- How to remove unwanted text bug in wordpress site
- get woocommerce product image url and price from database [closed]
- Trying to style Woocommerce sidebar Cart Widget [closed]
- Cancelled orders move to Trash automatically in Woocommerce – how to disable?
- Adding Field in WooCommerce
- Woocommerce Sort by default variation price
- Add Name and SKU Main Product to Secondary Product to Cart
- How can i access woocommerce order variables inside shortcode?
- Conditional logic – if product has a parent category, echo this
- WooCommerce set default product sort to product description (content) [closed]
- Custom action not working in Woocommerce
- Add rewrite rule to make Woocommerce product category page seo friendly
- How to show the urls inside the simple product when the customer buys it?
- Woocommerce variable product’s total amount by javascript
- Prices showed without decimals separator on BACKEND. Weight/price not working on Wocommerce
- add the attribute value above the english product title
- How to add woocommerce products header title in woocommerce_breadcrumb hook to function.php
- Save product short description in order (without updating in order details if it is updated in product)
- Can I create categories or attribute contain more than 70,000?
- Format decimals of get_price_html
- Combine one action and one filter
- How to run code when cookie is added?
- Return product list based on current product attribute
- Getting in an exception for get product detail by id in woocommerce REST api
- Applying pre-production modifications
- WooCommerce – Remove automaticly added membership product if user remove regular product from cart
- Temporary access to page with URL sent to email
- How to save a Woocomerce metabox input as a metadata field
- Product related to post by title
- How do you programatically add a booking item to the cart?
- populating extra field with woocommerce categories
- Woocommerce Shop Manager Capabilities
- customize src attribute in woocommerce single product image
- How to tell woocommerce slider to use thumbnails
- Add customer name to woocommerce email-header.php heading
- woocommerce sort by dropdown styling
- Mysql query – amount spent by customer
- How to change the link of product menu from wordpress admin panel
- bulk media crop for featured images
- Users credentials and syncing from third party with WooCommerce
- Anchor link to every product
- Plugin could not be activated because it triggered a fatal error
- Woocommerce custom product with JS script, can’t understand how it works [closed]
- Rename woocommerce button [closed]
- Making product image in woocommerce invoice linkable [closed]
- Can I remove WooCommerce specific product categories from shop managers?
- Fetch products with filter by similar categories at same time
- Trying query woocommerce product order by menu order and stock status
- editing product page template – getting template for related products not working
- Woocommerce | I want to the button ‘Add to Cart’ on the (all) product-page changed by just ‘open product’ button
- Adding line breaks in WooCommerce order processing emails
- Disable Woocommerce Block Editor
- Woocommerce backend sorting product drag drop by menu_order to date
- Save customer email via WPForms on checkbox marking when placing the Woocommerce order
- Searching in categories AND custom fields
- How to detect changes in WooCommerce store (react)?
- Issues with WooCommerce: jquery.blockUI.min.js