woocommerce_cart_item_removed_because_modified_message

woocommerce_cart_item_removed_because_modified_message

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

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_cart_item_removed_because_modified_message') is found 1 times:

  • /includes/class-wc-cart-session.php line 194
    			} elseif ( ! empty( $values['data_hash'] ) && ! hash_equals( $values['data_hash'], wc_get_cart_item_data_hash( $product ) ) ) { // phpcs:ignore PHPCompatibility.PHP.NewFunctions.hash_equalsFound
    				$update_cart_session = true;
    				/* translators: %1$s: product name. %2$s product permalink */
    				$message = sprintf( __( '%1$s has been removed from your cart because it has since been modified. You can add it back to your cart <a href="%2$s">here</a>.', 'woocommerce' ), $product->get_name(), $product->get_permalink() );
    				$message = apply_filters( 'woocommerce_cart_item_removed_because_modified_message', $message, $product );
    				wc_add_notice( $message, 'notice' );
    				do_action( 'woocommerce_remove_cart_item_from_session', $key, $values );
    
    			} else {
    				// Put session data into array. Run through filter so other plugins can load their own session data.
    				$session_data = array_merge(