parent
3626a2c2e4
commit
022d0a6480
|
@ -1271,4 +1271,22 @@ class WC_Product {
|
|||
|
||||
return $image;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get product name with extra details such as SKU price and attributes. Used within admin.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $product
|
||||
* @return void
|
||||
*/
|
||||
function get_formatted_name() {
|
||||
|
||||
if ( $this->get_sku() )
|
||||
$identifier = $this->get_sku();
|
||||
else
|
||||
$identifier = '#' . $this->id;
|
||||
|
||||
return sprintf( __( '%s – %s', 'woocommerce' ), $identifier, $this->get_title() );
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue