__( 'Sorry, you are not allowed to do this operation.', 'cartflows' ), 'nonce' => __( 'Nonce validation failed', 'cartflows' ), 'default' => __( 'Sorry, something went wrong.', 'cartflows' ), ); } /** * Get error message. * * @param string $type Message type. * @return string */ public function get_error_msg( $type ) { if ( ! isset( self::$errors[ $type ] ) ) { $type = 'default'; } return self::$errors[ $type ]; } } AjaxErrors::get_instance();