Skip to content

Instantly share code, notes, and snippets.

@Aeonexe
Last active October 7, 2020 12:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aeonexe/6aecce8e6034da5279c5e7e98188cfb7 to your computer and use it in GitHub Desktop.
Save Aeonexe/6aecce8e6034da5279c5e7e98188cfb7 to your computer and use it in GitHub Desktop.
is_woocommerce()
is_shop()
is_product_category()
is_product_category( 'shirts' )
is_product_category( array( 'shirts', 'games' ) )
is_product_tag()
is_product_tag( 'shirts' )
is_product_tag( array( 'shirts', 'games' ) )
is_product()
is_cart()
is_checkout()
is_account_page()
is_wc_endpoint_url()
// Returns true when viewing a WooCommerce endpoint
is_wc_endpoint_url( 'order-pay' )
// When the endpoint page for order pay is being displayed.
is_wc_endpoint_url( 'order-received' )
// When the endpoint page for order received is being displayed.
is_wc_endpoint_url( 'view-order' )
// When the endpoint page for view order is being displayed.
is_wc_endpoint_url( 'edit-account' )
// When the endpoint page for edit account is being displayed.
is_wc_endpoint_url( 'edit-address' )
// When the endpoint page for edit address is being displayed.
is_wc_endpoint_url( 'lost-password' )
// When the endpoint page for lost password is being displayed.
is_wc_endpoint_url( 'customer-logout' )
// When the endpoint page for customer logout is being displayed.
is_wc_endpoint_url( 'add-payment-method' )
// When the endpoint page for add payment method is being displayed.
is_ajax()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment