WC_Admin_List_Table_Products::render_is_in_stock_column()
Render column: is_in_stock.
Method of the class: WC_Admin_List_Table_Products{}
Hooks from the method
Return
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->render_is_in_stock_column();
WC_Admin_List_Table_Products::render_is_in_stock_column() WC Admin List Table Products::render is in stock column code WC 9.3.3
protected function render_is_in_stock_column() { if ( $this->object->is_on_backorder() ) { $stock_html = '<mark class="onbackorder">' . __( 'On backorder', 'woocommerce' ) . '</mark>'; } elseif ( $this->object->is_in_stock() ) { $stock_html = '<mark class="instock">' . __( 'In stock', 'woocommerce' ) . '</mark>'; } else { $stock_html = '<mark class="outofstock">' . __( 'Out of stock', 'woocommerce' ) . '</mark>'; } if ( $this->object->managing_stock() ) { $stock_html .= ' (' . wc_stock_amount( $this->object->get_stock_quantity() ) . ')'; } echo wp_kses_post( apply_filters( 'woocommerce_admin_stock_html', $stock_html, $this->object ) ); }