woocommerce_add_to_cart_qty_html

woocommerce_add_to_cart_qty_html

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_add_to_cart_qty_html') is found 1 times:

  • /includes/wc-cart-functions.php line 114
     
    	$product_id = null;
    	foreach ( $products as $product_id => $qty ) {
    		/* translators: %s: product name */
    		$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;
    	}
    
    	$titles = array_filter( $titles );
    	/* translators: %s: product name */
    	$added_text = sprintf( _n( '%s has been added to your cart.', '%s have been added to your cart.', $count, 'woocommerce' ), wc_format_list_of_items( $titles ) );