Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

CartController::add_product_names_to_message( string $singular, string $plural, array $items )

Generates the error message for out of stock products and adds product names to it.


Description Description


Parameters Parameters

$singular

(Required) The message to use when only one product is in the list.

$plural

(Required) The message to use when more than one product is in the list.

$items

(Required) The list of cart items whose names should be inserted into the message.


Top ↑

Source Source

File: packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php


			


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.