Added missing HTML filter for quantity

https://github.com/woocommerce/woocommerce/pull/21069#pullrequestreview-147005349
This commit is contained in:
Tomáš Kavalek 2018-09-05 20:39:12 +02:00 committed by GitHub
parent 34300a1c52
commit f93f36ee65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ function wc_add_to_cart_message( $products, $show_qty = false, $return = false )
foreach ( $products as $product_id => $qty ) {
/* translators: %s: product name */
$titles[] = ( $qty > 1 ? ( has_filter( 'woocommerce_add_to_cart_message_qty_html' ) ? apply_filters( 'woocommerce_add_to_cart_message_qty_html', $product_id, $qty ) : absint( $qty ) ) . ' × ' : '' ) . apply_filters( 'woocommerce_add_to_cart_item_name_in_quotes', sprintf( _x( '“%s”', 'Item name in quotes', 'woocommerce' ), strip_tags( get_the_title( $product_id ) ) ), $product_id );
$titles[] = apply_filters( 'woocommerce_add_to_cart_qty_html', ( $qty > 1 ? absint( $qty ) . ' × ' : '' ), $product_id ) . apply_filters( 'woocommerce_add_to_cart_item_name_in_quotes', sprintf( _x( '“%s”', 'Item name in quotes', 'woocommerce' ), strip_tags( get_the_title( $product_id ) ) ), $product_id );
$count += $qty;
}