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

apply_filters('woocommerce_cart_product_cannot_add_another_message') is found 1 times:

  • /includes/class-wc-cart.php line 1170
    					 * @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( '%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' ) ) );
    				}
    			}