Returns the current stock of the given product or the current product. In this last case, this tag must be within The Loop.
Current stock is calculated using the stock of the product minus the current units of the same product in the cart.
<?php echo tcp_get_the_current_stock(); echo tcp_get_the_current_stock( get_the_ID() ); echo tcp_get_the_current_stock( $post_id ); ?>
- (Integer) The ID of the product you’d like to returns its current stock. Defaults to the current product. In this case this tag must be within The Loop.