woocommerce_admin_stock_html

woocommerce_admin_stock_html

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_admin_stock_html') is found 2 times:

  • /includes/admin/list-tables/class-wc-admin-list-table-products.php line 283
    		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 ) );
    	}
    
    	/**
    	 * Query vars for custom searches.
    	 *
    	 * @param mixed $public_query_vars Array of query vars.
    
  • /includes/admin/reports/class-wc-report-stock.php line 120
    					$stock_html = '<mark class="instock">' . __( 'In stock', 'woocommerce' ) . '</mark>';
    				} else {
    					$stock_html = '<mark class="outofstock">' . __( 'Out of stock', 'woocommerce' ) . '</mark>';
    				}
    				echo apply_filters( 'woocommerce_admin_stock_html', $stock_html, $product );
    				break;
    
    			case 'stock_level':
    				echo esc_html( $product->get_stock_quantity() );
    				break;
    
    

See this hook used in plugins: