# fluent-cart/1.6.4/api/Exceptions/WPErrorException.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.6.4. 23 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/api/Exceptions/WPErrorException.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.6.4/raw/api/Exceptions/WPErrorException.php
- Modified: 2025-10-14T16:36:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/api/Exceptions/WPErrorException.php#L10-L20`.

```php
<?php

namespace FluentCart\Api\Exceptions;

class WPErrorException extends \Exception
{
	public function __construct(WP_Error $wpError, $message = "", $code = 0 , Exception $previous = NULL)
    {
        $this->wpError = $wpError;

        $this->code = $code ?: $wpError->get_error_code();
        
        $this->message = $message ?: $wpError->get_error_message();

        parent::__construct($message, $code, $previous);
    }

    public function errors()
    {
        return $this->wpError->get_error_messages();
    }
}

```
