Merge pull request #20714 from yratof/yratof-patch-item-name

Added filter on item name in quotes
This commit is contained in:
Claudiu Lodromanean 2018-07-09 11:06:45 -07:00 committed by GitHub
commit 4d0890bf3b
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 ? absint( $qty ) . ' × ' : '' ) . sprintf( _x( '“%s”', 'Item name in quotes', 'woocommerce' ), strip_tags( get_the_title( $product_id ) ) );
$titles[] = ( $qty > 1 ? 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 );
$count += $qty;
}