woocommerce_cart_product_cannot_be_purchased_message

woocommerce_cart_product_cannot_be_purchased_message

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_cart_product_cannot_be_purchased_message') is found 1 times:

  • /includes/class-wc-cart.php line 1185
    				 * @since 3.8.0
    				 * @param string     $message Message.
    				 * @param WC_Product $product_data Product data.
    				 */
    				$message = apply_filters( 'woocommerce_cart_product_cannot_be_purchased_message', $message, $product_data );
    				throw new Exception( $message );
    			}
    
    			// Stock check - only check if we're managing stock and backorders are not allowed.
    			if ( ! $product_data->is_in_stock() ) {
    				/* translators: %s: product name */