I am trying to conditionally show some content based on a few Woocommerce conditionals.
I want to show content when:
-
Not on a product page
-
Not on the checkout page
-
But, on the order received checkout endpoint
The below code is not quite working, the first 2 work correctly but the endpoint doesn't seem to work as it is part of the checkout page? Any ideas how to adjust?
<? if( !is_product() && !is_checkout() && is_wc_endpoint_url('order-received' ): ?>
MY CONTENT
<? endif ?>
Aucun commentaire:
Enregistrer un commentaire