, , , : D
, , .
class-wc-admin-post-types.php, woocommerce/includes/admin
277
case 'sku' :
$type = (get_class($the_product));
if( $type == 'WC_Product_Variable' ){
$available_variations = $the_product->get_available_variations();
echo '<strong> Variations: </strong>' . count($available_variations) . '<br><br>';
for ($i = 0; $i < count($available_variations); $i++ ) {
echo ($available_variations[$i]['sku']) . '<br>';
}
}
else {
echo $the_product->get_sku() ? $the_product->get_sku() : '<span class="na">–</span>';
}
break;
- :
, , , sku.
, , , .
, - . , !

... , , ... , , 344, .
case 'is_in_stock' :
$type = (get_class($the_product));
if( $type == 'WC_Product_Variable' ){
$available_variations = $the_product->get_available_variations();
echo '<strong> Variations stock: </strong> <br><br>';
for ($i = 0; $i < count($available_variations); $i++ ) {
if ( $available_variations[$i]['is_in_stock'] == 0 ) {
echo '<mark class="outofstock">' . __( 'Out of stock', 'woocommerce' ) . '</mark>';
}else {
echo '<mark class="instock">' . __( 'In stock', 'woocommerce' ) . '</mark>';
}
if ($available_variations[$i]['variation_is_active']) {
echo ' × ' . $available_variations[$i]['max_qty'] . '<br>' ;
}
}
} else {
if ( $the_product->is_in_stock() ) {
echo '<mark class="instock">' . __( 'In stock', 'woocommerce' ) . '</mark>';
} else {
echo '<mark class="outofstock">' . __( 'Out of stock', 'woocommerce' ) . '</mark>';
}
if ( $the_product->managing_stock() ) {
echo ' × ' . $the_product->get_total_stock() ;
}
}
break;
- :

. .
: ... , .
https://github.com/woothemes/woocommerce/issues/9396