wc_get_loop_product_visibility()
Gets the cached current visibility for a product from the woocommerce_loop global.
Хуков нет.
Возвращает
true|false|null. The cached product visibility, or null if on visibility has been cached for that product.
Использование
wc_get_loop_product_visibility( $product_id );
- $product_id(int) (обязательный)
- Product id to get the cached visibility for.
Список изменений
| С версии 4.4.0 | Введена. |
Код wc_get_loop_product_visibility() wc get loop product visibility WC 10.6.2
function wc_get_loop_product_visibility( $product_id ) {
return wc_get_loop_prop( "product_visibility_$product_id", null );
}