adding default product visibility filter hook

Added a filter hook ‚woocommerce_product_visibility_default’ to set the
default visibility option on new products
This commit is contained in:
daniel von mitschke 2014-07-12 14:30:43 +02:00
parent 822d477f72
commit b991617ff7
1 changed files with 1 additions and 1 deletions

View File

@ -1910,7 +1910,7 @@ class WC_Admin_Post_Types {
return;
}
$current_visibility = ( $current_visibility = get_post_meta( $post->ID, '_visibility', true ) ) ? $current_visibility : 'visible';
$current_visibility = ( $current_visibility = get_post_meta( $post->ID, '_visibility', true ) ) ? $current_visibility : apply_filters( 'woocommerce_product_visibility_default' , 'visible' );
$current_featured = ( $current_featured = get_post_meta( $post->ID, '_featured', true ) ) ? $current_featured : 'no';
$visibility_options = apply_filters( 'woocommerce_product_visibility_options', array(