Add filter for “An appointment has been removed” notice

Issue #795 new
Roman Sulym created an issue

class-wc-appointment-cart-manager.php > cart_loaded_from_session()

Please add a filter to modify or completely cancel the “An appointment for %s has been removed from your cart due to inactivity” notice.

The last line

wc_add_notice( $notice, 'notice' );

can be changed to

$notice = apply_filters('woocommerce_appointments_remove_inactive_notice', $notice, $this);

if ( $notice ) {
  wc_add_notice( $notice, 'notice' );
}

Comments (0)

  1. Log in to comment