wc_clear_notices

Unset all notices.

Description

wc_clear_notices(); 

Usage

  1. if ( !function_exists( 'wc_clear_notices' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-notice-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wc_clear_notices(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-notice-functions.php  
  1. function wc_clear_notices() { 
  2. if ( ! did_action( 'woocommerce_init' ) ) { 
  3. wc_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before woocommerce_init.', woocommerce ), '2.3' ); 
  4. return; 
  5. WC()->session->set( 'wc_notices', null );