wcpgsk_add_error

Handle functions deprecated in WooCommerce since 2.1.0 for WooCommerce installations < 2.1.

Description

wcpgsk_add_error( $error ); 

Parameters (1)

0. $error
The error.

Usage

  1. if ( !function_exists( 'wcpgsk_add_error' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-poor-guys-swiss-knife/wcpgsk-af.php'; 
  3.  
  4. // The error. 
  5. $error = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wcpgsk_add_error($error); 
  9.  

Defined (1)

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

/wcpgsk-af.php  
  1. function wcpgsk_add_error( $error ) { 
  2. if ( function_exists('WC') && function_exists('wc_add_notice') ) : 
  3. wc_add_notice( $error, error); 
  4. else : 
  5. global $woocommerce; 
  6. $woocommerce->add_error( $error ); 
  7. endif;