Get product name with SKU or ID. Used within admin.

Description Description

Return Return

(string) Formatted product name

Top ↑

Source Source

File: includes/abstracts/abstract-wc-product.php

	public function get_formatted_name() {
		if ( $this->get_sku() ) {
			$identifier = $this->get_sku();
		} else {
			$identifier = '#' . $this->get_id();
		return sprintf( '%2$s (%1$s)', $identifier, $this->get_name() );

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.