Automattic\WooCommerce\Internal\StockNotifications\Admin

ListTable::column_date_created_gmtpublicWC 1.0

Handles the notification date column output.

Method of the class: ListTable{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ListTable = new ListTable();
$ListTable->column_date_created_gmt( $notification );
$notification(Notification) (required)
The notification object.

ListTable::column_date_created_gmt() code WC 10.3.6

public function column_date_created_gmt( $notification ) {
	$date_created = $notification->get_date_created();

	if ( ! $date_created ) {
		$t_time = __( '—', 'woocommerce' );
		$h_time = $t_time;
	} else {
		$date_created = $date_created->getTimestamp();
		$t_time       = date_i18n( _x( 'Y/m/d g:i:s a', 'list table date hover format', 'woocommerce' ), $date_created );
		$h_time       = date_i18n( wc_date_format(), $date_created );
	}

	echo '<span title="' . esc_attr( $t_time ) . '">' . esc_html( $h_time ) . '</span>';
}