Automattic\WooCommerce\Internal\StockNotifications\Admin
ListTable::column_status
Handles the status column output.
Method of the class: ListTable{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ListTable = new ListTable(); $ListTable->column_status( $notification );
- $notification(Notification) (required)
- The notification object.
ListTable::column_status() ListTable::column status code WC 10.3.6
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 ) );
}