get_formatted_name() public méthode

Get product name with SKU or ID. Used within admin.
public get_formatted_name ( ) : string
Résultat string Formatted product name
 /**
  * No stock notification email.
  *
  * @param WC_Product $product
  */
 public function no_stock($product)
 {
     $subject = sprintf('[%s] %s', $this->get_blogname(), __('Product out of stock', 'woocommerce'));
     $message = sprintf(__('%s is out of stock.', 'woocommerce'), html_entity_decode(strip_tags($product->get_formatted_name()), ENT_QUOTES, get_bloginfo('charset')));
     wp_mail(apply_filters('woocommerce_email_recipient_no_stock', get_option('woocommerce_stock_email_recipient'), $product), apply_filters('woocommerce_email_subject_no_stock', $subject, $product), apply_filters('woocommerce_email_content_no_stock', $message, $product), apply_filters('woocommerce_email_headers', '', 'no_stock', $product), apply_filters('woocommerce_email_attachments', array(), 'no_stock', $product));
 }
/**
 * Get product name with extra details such as SKU price and attributes. Used within admin.
 *
 * @access public
 * @param WC_Product $product
 * @deprecated 2.1
 * @return string
 */
function woocommerce_get_formatted_product_name($product)
{
    _deprecated_function(__FUNCTION__, '2.1', 'WC_Product::get_formatted_name()');
    return $product->get_formatted_name();
}