Automattic\WooCommerce\Internal\PushNotifications\Exceptions

PushTokenInvalidDataException{} │ WC 10.6.0└─ WC_Data_Exception

Exception thrown when push token data is invalid.

Хуков нет.

Использование

$PushTokenInvalidDataException = new PushTokenInvalidDataException();
// use class methods

Методы

  1. public __construct( string $message )

Список изменений

С версии 10.6.0 Введена.

Код PushTokenInvalidDataException{} WC 11.3.0

class PushTokenInvalidDataException extends WC_Data_Exception {
	/**
	 * Constructor.
	 *
	 * @since 10.6.0
	 * @param string $message The validation error message.
	 */
	public function __construct( string $message ) {
		parent::__construct(
			'woocommerce_invalid_data',
			$message,
			WP_Http::BAD_REQUEST
		);
	}
}