WordPress at Your Fingertips
  • About About Contacts RSS feed
  • WordPress WordPress Cheat Sheet Codex Sitemap WP-CLI
  • Functions Functions Conditional Tags Template Tags By Files WordPress - all WooCommerce - all
  • Hooks Hooks Trigger Order WordPress - all WooCommerce - all
  • Notes Notes
Log In . Register
› Plugins › WooCommerce › All Functions › WC Conditional Tags ›
Kama11 months ago

is_product() │ WC 1.0

Is_product - Returns true when viewing a single product.

Uses: is_singular()

No Hooks.

Return

true|false.

Usage

is_product();

Code of is_product() is product WC 6.5.1

woocommerce/includes/wc-conditional-functions.php
function is_product() {
	return is_singular( array( 'product' ) );
}

Related Functions

WC Conditional Tags

  • is_cart()
  • is_checkout()
  • is_checkout_pay_page()
  • is_product_tag()
  • is_shop()
  • is_woocommerce()
  • wc_coupons_enabled()
No comments
        Log In
    WooCommerce
    3872 голоса
    5 ★
    3206
    4 ★
    157
    3 ★
    88
    2 ★
    88
    1 ★
    333
    90%
    Download
    Version6.5.1 — 16 days ago Changelog
    Activated on5 000 000+ sites
    Linkswordpress.org
    woocommerce.com
    Author Automattic
    Tested onWP 6.0 Version compatibility
    RequiresWP 5.7+
    RequiresPHP 7.2+ Version compatibility
    Created10.6 years ago

    Testplugintests.com
    Code ofplugins.svn.wordpress.org
    Versions
    6.5.1   6.5.0   6.4.1   ····
    WP-CLIwp plugin install woocommerce --activate
    WooCommerce
    • All Functions of WooCommerce
    • All Hooks of WooCommerce
    Kama © 2010-2022
    SQL: 24 in 0.158 sec. 5.15 MB
    Contacts
    ⌚
    Upload image
    DRAG and DROP or past from the CLIPBOARD