/**
  * Store any messages or errors added by other plugins, particularly important for those occasions when the new payment
  * method caused and error or failure.
  *
  * @since 1.4
  */
 public static function store_pay_shortcode_mesages()
 {
     if (wc_notice_count('notice') > 0) {
         self::$woocommerce_messages = wc_get_notices('success');
         self::$woocommerce_messages += wc_get_notices('notice');
     }
     if (wc_notice_count('error') > 0) {
         self::$woocommerce_errors = wc_get_notices('error');
     }
 }
 /**
  * Store any messages or errors added by other plugins, particularly important for those occasions when the new payment
  * method caused and error or failure.
  *
  * @since 1.4
  */
 public static function store_pay_shortcode_mesages()
 {
     global $woocommerce;
     if ($woocommerce->message_count() > 0) {
         self::$woocommerce_messages = $woocommerce->get_messages();
     }
     if ($woocommerce->error_count() > 0) {
         self::$woocommerce_errors = $woocommerce->get_errors();
     }
 }
 /**
  * Store any messages or errors added by other plugins, particularly important for those occasions when the new payment
  * method caused and error or failure.
  *
  * @since 1.4
  */
 public static function store_pay_shortcode_mesages()
 {
     global $woocommerce;
     if (function_exists('wc_notice_count')) {
         // WC 2.1+
         if (wc_notice_count('notice') > 0) {
             self::$woocommerce_messages = wc_get_notices('success');
             self::$woocommerce_messages += wc_get_notices('notice');
         }
         if (wc_notice_count('error') > 0) {
             self::$woocommerce_errors = wc_get_notices('error');
         }
     } else {
         if ($woocommerce->message_count() > 0) {
             self::$woocommerce_messages = $woocommerce->get_messages();
         }
         if ($woocommerce->error_count() > 0) {
             self::$woocommerce_errors = $woocommerce->get_errors();
         }
     }
 }