| 1 |
<?php |
| 2 |
namespace Elementor\Data\V2\Base\Exceptions; |
| 3 |
|
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; // Exit if accessed directly. |
| 6 |
} |
| 7 |
|
| 8 |
class WP_Error_Exception extends Data_Exception { |
| 9 |
public function __construct( \WP_Error $wp_error ) { |
| 10 |
parent::__construct( $wp_error->get_error_message(), $wp_error->get_error_code(), [ |
| 11 |
'status' => $wp_error->get_error_code(), |
| 12 |
] ); |
| 13 |
} |
| 14 |
} |
| 15 |
|