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.9.7.1

apply_filters('woocommerce_add_to_cart_qty_html') is found 1 times:

  • /includes/wc-cart-functions.php line 116
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    $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 ) );