Try this custom hooked function in woocommerce_thankyou action hook: add_action( 'woocommerce_thankyou', 'custom_content_thankyou' ...
It redirects you to a simple Thank You page (or “Order received”
WooCommerce thank you page title The first hook woocommerce_endpoint_order-received_title allows to change "Order received" text, the second hook ...
PHP Snippet: Add Content to the WooCommerce Thank You Page
WooCommerce Thank you Page Visual Hooks Guide. Order received. woocommerce_before_thankyou. Thank you. Your order has been ...
populated though woocommerce_order_details_after_customer_details hook ...
can only use conditional query tags after the posts_selection action hook in WordPress
Thus, the order received page can be used as a starting point for this new customer relationship.
Pay page – /order-pay/{ORDER_ID}; Order received (thanks) – /order-received/; Add payment method – /add-payment-method/; Delete payment method ...
WooCommerce Code Reference