woocommerce_cart_product_cannot_add_another_message

woocommerce_cart_product_cannot_add_another_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_add_another_message') is found 1 times:

  • /includes/class-wc-cart.php line 1169
    					 * @since 4.5.0
    					 * @param string     $message Message.
    					 * @param WC_Product $product_data Product data.
    					 */
    					$message         = apply_filters( 'woocommerce_cart_product_cannot_add_another_message', $message, $product_data );
    					$wp_button_class = wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '';
    
    					throw new Exception( sprintf( '<a href="%s" class="button wc-forward%s">%s</a> %s', wc_get_cart_url(), esc_attr( $wp_button_class ), __( 'View cart', 'woocommerce' ), $message ) );
    				}
    			}