php Woocommerce条件标签参考

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php Woocommerce条件标签参考相关的知识,希望对你有一定的参考价值。

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()

以上是关于php Woocommerce条件标签参考的主要内容,如果未能解决你的问题,请参考以下文章

php 重新排列woocommerce标签

php 删除Woocommerce标签

php [WooCommerce Core]添加自定义标签

php [WooCommerce Core]添加自定义标签

php [WooCommerce Core]重新排序标签

php [WooCommerce Core]重新排序标签