WC_Admin_List_Table_Products::render_featured_column()protectedWC 1.0

Render column: featured.

{} It's a method of the class: WC_Admin_List_Table_Products{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->render_featured_column();

Code of WC_Admin_List_Table_Products::render_featured_column() WC 6.7.0

protected function render_featured_column() {
	$url = wp_nonce_url( admin_url( 'admin-ajax.php?action=woocommerce_feature_product&product_id=' . $this->object->get_id() ), 'woocommerce-feature-product' );
	echo '<a href="' . esc_url( $url ) . '" aria-label="' . esc_attr__( 'Toggle featured', 'woocommerce' ) . '">';
	if ( $this->object->is_featured() ) {
		echo '<span class="wc-featured tips" data-tip="' . esc_attr__( 'Yes', 'woocommerce' ) . '">' . esc_html__( 'Yes', 'woocommerce' ) . '</span>';
	} else {
		echo '<span class="wc-featured not-featured tips" data-tip="' . esc_attr__( 'No', 'woocommerce' ) . '">' . esc_html__( 'No', 'woocommerce' ) . '</span>';
	}
	echo '</a>';
}