EasyDigitalDownloads
3 years ago
Elementor
2 years ago
Integrations
3 years ago
MemberPress
2 years ago
Plugins
2 years ago
Promos
3 years ago
Rules
2 years ago
Shortcodes
2 years ago
WPForms
3 years ago
WooCommerce
2 years ago
Actions.php
2 years ago
Ajax.php
4 years ago
Api.php
2 years ago
ApiAuth.php
4 years ago
ApiKey.php
2 years ago
AssetLoader.php
5 years ago
BaseRestApi.php
3 years ago
Blocks.php
2 years ago
ClassicEditor.php
3 years ago
ConstantContact.php
4 years ago
Debug.php
4 years ago
EasyDigitalDownloads.php
3 years ago
Elementor.php
3 years ago
Inserter.php
3 years ago
InstallSkin.php
5 years ago
InstallSkinCompat.php
5 years ago
MailPoet.php
4 years ago
MemberPress.php
2 years ago
Menu.php
2 years ago
Notifications.php
3 years ago
OmuApi.php
4 years ago
Output.php
2 years ago
Pages.php
2 years ago
Partners.php
2 years ago
Plugins.php
3 years ago
Promos.php
3 years ago
Refresh.php
2 years ago
RestApi.php
2 years ago
RevenueAttribution.php
4 years ago
Review.php
4 years ago
Rules.php
3 years ago
Save.php
2 years ago
Shortcode.php
4 years ago
Sites.php
2 years ago
Support.php
3 years ago
Type.php
3 years ago
Urls.php
2 years ago
Utils.php
3 years ago
Validate.php
4 years ago
WPForms.php
2 years ago
Welcome.php
4 years ago
Widget.php
4 years ago
WooCommerce.php
2 years ago
Wordfence.php
3 years ago
WpErrorException.php
5 years ago
WpErrorException.php
49 lines
| 1 | <?php |
| 2 | /** |
| 3 | * WP_Error Exception class. |
| 4 | * |
| 5 | * @since 2.0.0 |
| 6 | * |
| 7 | * @package OMAPI |
| 8 | * @author Justin Sternberg |
| 9 | */ |
| 10 | |
| 11 | // Exit if accessed directly. |
| 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | exit; |
| 14 | } |
| 15 | |
| 16 | /** |
| 17 | * WP_Error Exception class. |
| 18 | * |
| 19 | * @since 2.0.0 |
| 20 | */ |
| 21 | class OMAPI_WpErrorException extends Exception { |
| 22 | |
| 23 | /** |
| 24 | * The WP_Error object to this exception. |
| 25 | * |
| 26 | * @since 2.0.0 |
| 27 | * |
| 28 | * @var null|WP_Error |
| 29 | */ |
| 30 | protected $wp_error = null; |
| 31 | |
| 32 | /** |
| 33 | * Sets the WP_Error object to this exception. |
| 34 | * |
| 35 | * @since 2.0.0 |
| 36 | * |
| 37 | * @param WP_Error $error The WP_Error object. |
| 38 | */ |
| 39 | public function setWpError( WP_Error $error ) { |
| 40 | $this->wp_error = $error; |
| 41 | |
| 42 | return $this; |
| 43 | } |
| 44 | |
| 45 | public function getWpError() { |
| 46 | return $this->wp_error; |
| 47 | } |
| 48 | } |
| 49 |