Automattic\WooCommerce\Internal\StockNotifications\Admin

ListTable::column_status │ public │ WC 1.0

Handles the status column output.

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

Хуков нет.

Возвращает

void. Ничего (null).

Использование

$ListTable = new ListTable();
$ListTable->column_status( $notification );
$notification(Notification) (обязательный)
The notification object.

Код ListTable::column_status() WC 11.3.0

public function column_status( $notification ) {

	if ( $notification->get_status() === NotificationStatus::PENDING ) {
		$status = 'cancelled';
		$label  = _x( 'Pending', 'stock notification status', 'woocommerce' );
	} elseif ( $notification->get_status() === NotificationStatus::CANCELLED ) {
		$status = 'cancelled';
		$label  = _x( 'Cancelled', 'stock notification status', 'woocommerce' );
	} elseif ( $notification->get_status() === NotificationStatus::SENT ) {
		$status = 'cancelled';
		$label  = _x( 'Sent', 'stock notification status', 'woocommerce' );
	} else {
		$status = 'completed';
		$label  = _x( 'Active', 'stock notification status', 'woocommerce' );
	}

	printf( '<mark class="order-status %s"><span>%s</span></mark>', esc_attr( sanitize_html_class( 'status-' . $status ) ), esc_html( $label ) );
}