WC_Gateway_Paypal_Webhook_Handler{}
Устарела с версии 10.5.0 Deprecated in favor of Automattic\WooCommerce\Gateways\PayPal\WebhookHandler. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.
Handles webhook events.
Хуков нет.
Использование
$WC_Gateway_Paypal_Webhook_Handler = new WC_Gateway_Paypal_Webhook_Handler(); // use class methods
Методы
- public __construct()
- public process_webhook( WP_REST_Request $request )
Список изменений
| Устарела с 10.5.0 | Deprecated in favor of Automattic\WooCommerce\Gateways\PayPal\WebhookHandler |
Код WC_Gateway_Paypal_Webhook_Handler{} WC Gateway Paypal Webhook Handler{} WC 11.2.2
class WC_Gateway_Paypal_Webhook_Handler {
/**
* The delegated webhook handler instance.
*
* @var PayPalWebhookHandler
*/
private PayPalWebhookHandler $webhook_handler;
/**
* Constructor.
*/
public function __construct() {
$this->webhook_handler = new PayPalWebhookHandler();
}
/**
* Process the webhook event.
*
* @deprecated 10.5.0 Use Automattic\WooCommerce\Gateways\PayPal\WebhookHandler::process_webhook() instead. This method will be removed in 11.0.0.
*
* @param WP_REST_Request $request The request object.
*
* @return void
*
* @deprecated 10.5.0 Deprecated in favor of Automattic\WooCommerce\Gateways\PayPal\WebhookHandler::process_webhook
*/
public function process_webhook( WP_REST_Request $request ) {
wc_deprecated_function(
__METHOD__,
'10.5.0',
PayPalWebhookHandler::class . '::process_webhook()'
);
$this->webhook_handler->process_webhook( $request );
}
}