Created function to get the catalog visibility options

This commit is contained in:
Claudio Sanches 2016-09-23 04:19:11 -03:00
parent e0572c782d
commit a78f2541b9
1 changed files with 15 additions and 0 deletions

View File

@ -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' ),
) );
}