woocommerce_product_visibility_options
Get product visibility options.
Usage
add_filter( 'woocommerce_product_visibility_options', 'wp_kama_woocommerce_product_visibility_options_filter' ); /** * Function for `woocommerce_product_visibility_options` filter-hook. * * @param $array * * @return */ function wp_kama_woocommerce_product_visibility_options_filter( $array ){ // filter... return $array; }
- $array
- -
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
woocommerce_product_visibility_options
woocommerce/includes/wc-product-functions.php 913-921
return apply_filters( 'woocommerce_product_visibility_options', array( 'visible' => __( 'Shop and search results', 'woocommerce' ), 'catalog' => __( 'Shop only', 'woocommerce' ), 'search' => __( 'Search results only', 'woocommerce' ), 'hidden' => __( 'Hidden', 'woocommerce' ), ) );
woocommerce/includes/admin/views/html-quick-edit-product.php 142-150
$options = apply_filters( 'woocommerce_product_visibility_options', array( 'visible' => __( 'Catalog & search', 'woocommerce' ), 'catalog' => __( 'Catalog', 'woocommerce' ), 'search' => __( 'Search', 'woocommerce' ), 'hidden' => __( 'Hidden', 'woocommerce' ), ) );