Merge pull request #14473 from woocommerce/fix/14470
Fix metabox logic.
This commit is contained in:
commit
1a2879d4e1
|
@ -12,7 +12,7 @@
|
|||
</label>
|
||||
|
||||
<?php foreach ( self::get_product_type_options() as $key => $option ) :
|
||||
if ( $product_object ) {
|
||||
if ( metadata_exists( 'post', $post->ID, '_' . $key ) ) {
|
||||
$selected_value = is_callable( array( $product_object, "is_$key" ) ) ? $product_object->{"is_$key"}() : 'yes' === get_post_meta( $post->ID, '_' . $key, true );
|
||||
} else {
|
||||
$selected_value = 'yes' === ( isset( $option['default'] ) ? $option['default'] : 'no' );
|
||||
|
|
Loading…
Reference in New Issue