PushTokenNotFoundException.php
34 lines
| 1 | <?php |
| 2 | /** |
| 3 | * PushTokenNotFoundException class file. |
| 4 | */ |
| 5 | |
| 6 | declare( strict_types = 1 ); |
| 7 | |
| 8 | namespace Automattic\WooCommerce\Internal\PushNotifications\Exceptions; |
| 9 | |
| 10 | defined( 'ABSPATH' ) || exit; |
| 11 | |
| 12 | use WC_Data_Exception; |
| 13 | use WP_Http; |
| 14 | |
| 15 | /** |
| 16 | * Exception thrown when a push token cannot be found. |
| 17 | * |
| 18 | * @since 10.5.0 |
| 19 | */ |
| 20 | class PushTokenNotFoundException extends WC_Data_Exception { |
| 21 | /** |
| 22 | * Constructor. |
| 23 | * |
| 24 | * @since 10.6.0 |
| 25 | */ |
| 26 | public function __construct() { |
| 27 | parent::__construct( |
| 28 | 'woocommerce_invalid_push_token', |
| 29 | 'Push token could not be found.', |
| 30 | WP_Http::NOT_FOUND |
| 31 | ); |
| 32 | } |
| 33 | } |
| 34 |