Description
Returns the stock of the given product or the current product. In this last case, this tag must be within The Loop.
Usage
<?php echo tcp_get_the_stock(); echo tcp_get_the_stock( get_the_ID() ); echo tcp_get_the_stock( $post_id ); ?>
Parameters
- $post_id
- (Integer) The ID of the product you’d like to returns its stock. Defaults to the current product. In this case this tag must be within The Loop.