WC_Query::get_errors()
Get any errors from querystring.
Description Description
Source Source
File: includes/class-wc-query.php
public function get_errors() { $error = ! empty( $_GET['wc_error'] ) ? sanitize_text_field( wp_unslash( $_GET['wc_error'] ) ) : ''; // WPCS: input var ok, CSRF ok. if ( $error && ! wc_has_notice( $error, 'error' ) ) { wc_add_notice( $error, 'error' ); } }