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

apply_filters('woocommerce_cart_product_cannot_add_another_message') is found 1 times:

  • /includes/class-wc-cart.php line 1202
    					 * @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' ) : '';
    
    					if ( ! CartCheckoutUtils::has_cart_page() ) {
    						$message = sprintf( '%s', esc_html( $message ) );
    					} else {
    						$message = sprintf( '%s <a href="%s" class="button wc-forward%s">%s</a>', $message, esc_url( wc_get_cart_url() ), esc_attr( $wp_button_class ), __( 'View cart', 'woocommerce' ) );