Automattic\WooCommerce\Internal\StockNotifications\Admin
ListTable::column_product
Handles the product column output.
Method of the class: ListTable{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ListTable = new ListTable(); $ListTable->column_product( $notification );
- $notification(Notification) (required)
- The notification object.
ListTable::column_product() ListTable::column product code WC 10.3.6
public function column_product( $notification ) {
$product = $notification->get_product();
if ( ! is_a( $product, 'WC_Product' ) ) {
echo '—';
return;
}
$name = $product->get_name();
$formatted_variation_list = $this->get_product_formatted_variation_list( true );
if ( $formatted_variation_list ) {
/* translators: product name, identifier */
$name .= '<span class="description">' . $formatted_variation_list . '</span>';
}
echo wp_kses_post(
sprintf(
'<a target="_blank" href="' . admin_url( 'post.php?post=%d&action=edit' ) . '">%s</a>',
$product->get_parent_id() ? absint( $product->get_parent_id() ) : absint( $product->get_id() ),
$name
)
);
}