Tweak message #4335

This commit is contained in:
Mike Jolley 2014-01-08 13:38:31 +00:00
parent 660c0368b6
commit a54223f910
1 changed files with 3 additions and 2 deletions

View File

@ -451,8 +451,9 @@ class WC_Product_Variable extends WC_Product {
if ( ! $children && get_post_status( $product_id ) == 'publish' ) {
$wpdb->update( $wpdb->posts, array( 'post_status' => 'draft' ), array( 'ID' => $product_id ) );
if ( is_admin() )
WC_Admin_Meta_Boxes::add_error( __( 'This variable product has no active variations and will not be published.', 'woocommerce' ) );
if ( is_admin() ) {
WC_Admin_Meta_Boxes::add_error( __( 'This variable product has no active variations so cannot be published. Changing status to draft.', 'woocommerce' ) );
}
// Loop the variations
} else {