Created function to get the catalog visibility options
This commit is contained in:
parent
e0572c782d
commit
a78f2541b9
|
@ -733,3 +733,18 @@ function wc_get_product_attachment_props( $attachment_id, $product = false ) {
|
|||
}
|
||||
return $props;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get product visibility options.
|
||||
*
|
||||
* @since 2.7.0
|
||||
* @return array
|
||||
*/
|
||||
function wc_get_product_visibility_options() {
|
||||
return apply_filters( 'woocommerce_product_visibility_options', array(
|
||||
'visible' => __( 'Catalog/search', 'woocommerce' ),
|
||||
'catalog' => __( 'Catalog', 'woocommerce' ),
|
||||
'search' => __( 'Search', 'woocommerce' ),
|
||||
'hidden' => __( 'Hidden', 'woocommerce' ),
|
||||
) );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue