Add stock with different function

This commit is contained in:
Mike Jolley 2019-03-12 14:48:05 +00:00
parent f8dded8b49
commit 5b1814016b
1 changed files with 3 additions and 1 deletions

View File

@ -1562,7 +1562,9 @@ class WC_AJAX {
$managing_stock = $product_object->managing_stock();
if ( $managing_stock && ! empty( $_GET['display_stock'] ) ) {
$formatted_name .= ' – ' . wc_format_stock_for_display( $product_object );
$stock_amount = $product_object->get_stock_quantity();
/* Translators: %d stock amount */
$formatted_name .= ' – ' . sprintf( __( 'Stock: %d', 'woocommerce' ), wc_format_stock_quantity_for_display( $stock_amount, $product_object ) );
}
$products[ $product_object->get_id() ] = rawurldecode( $formatted_name );