Woocommerce Conditions, If Statement, Functions

Woocommerce Conditions

is_ajax() Returns true when the page is loaded via ajax.
is_shop() Returns true when on the product archive page (shop).
is_account_page() Returns true on the customer’s account pages.
is_checkout() Returns true on the checkout page.
is_cart() Returns true on the cart page.
is_product() Returns true on a single product page. Wrapper for is_singular.
is_product_tag() Returns true when viewing a product tag archive
is_product_category() Returns true when viewing a product category archive.

Endpoint

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.
jass

Share
Published by
jass

Recent Posts

Google Chrome Developer Tools (DevTools)

🔍 How to Open DevTools You can open DevTools in several ways: Right-click on any…

3 days ago

Why Ignoring the Model Context Protocol (MCP) Could Cripple California’s AI Future

Model Context Protocol (MCP) is revolutionizing how AI applications connect with external tools, APIs, and…

4 days ago

Funding opportunity through Small Business Innovation Research (SBIR) for New/Small Businesses

The Small Business Innovation Research (SBIR) program offers a vital pathway for startups to secure…

1 week ago

California Dreaming: 10 Business Ideas with Case Studies and SWOT Analysis

Looking to start a business in California? This guide explores 10 high-potential business ideas—from real…

2 weeks ago

USA resources

UNited States https://www.glassdoor.co.in/Overview/Working-at-Prefr-co-EI_IE7010540.11,19.htm https://www.ambitionbox.com/overview/prefr-dot-co-overview https://rocketreach.co/prefrco-management_b7c95a7ec0ee0ee2 https://www.signalhire.com/companies/prefr-co https://www.zoominfo.com/c/prefrco/557658591 United Kingdom https://www.yellowtom.co.uk/reviews/1417493 Canada https://www.pandia.com/ca/oshawa-on/graphic-design Singapore https://talenttribe.asia/companies/prefr-co India…

2 weeks ago

Blockchain Engineer

We are seeking a skilled and motivated Blockchain Engineer to join our team. In this…

2 weeks ago