Hi @nauriskolats
Thank you for the update.
so that is not really how WooCommerce has intended it and it seems that there is some issue.
There isn’t any code in the Stripe plugin that returns true using the filters in the is_checkout
function. That filter name is woocommerce_is_checkout
. However, if you review the core WooCommerce code you will see that the function is_checkout
conditionally checks if the page being rendered contains the WooCommerce Checkout shortcode, so it returns true since the thank you page is a part of the checkout shortcode.
So your logic should do something like:
if(is_checkout() && !is_order_received_page()){
}
Kind Regards