Automattic\WooCommerce\Internal\Admin\Notes

OrderMilestones::get_note_title_for_milestone()public staticWC 1.0

Get the appropriate note title for a given milestone.

Метод класса: OrderMilestones{}

No Hooks.

Return

String. Note title for the milestone.

Usage

$result = OrderMilestones::get_note_title_for_milestone( $milestone );
$milestone(int) (required)
Order milestone.

Code of OrderMilestones::get_note_title_for_milestone() WC 7.1.0

public static function get_note_title_for_milestone( $milestone ) {
	switch ( $milestone ) {
		case 1:
			return __( 'First order received', 'woocommerce' );
		case 10:
		case 100:
		case 250:
		case 500:
		case 1000:
		case 5000:
		case 10000:
		case 500000:
		case 1000000:
			return sprintf(
				/* translators: Number of orders processed. */
				__( 'Congratulations on processing %s orders!', 'woocommerce' ),
				wc_format_decimal( $milestone )
			);
		default:
			return '';
	}
}