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

apply_filters('woocommerce_cart_product_cannot_be_purchased_message') is found 1 times:

  • /includes/class-wc-cart.php line 1191
    1187
    1188
    1189
    1190
    1191
    1192
    1193
    1194
    1195
    1196
    1197
         * @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 */