Automattic\WooCommerce\Gateways\PayPal
Request::get_paypal_order_intent
Get the value for the intent field in the create-order request.
Метод класса: Request{}
Хуков нет.
Возвращает
string.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_paypal_order_intent(): string;
Код Request::get_paypal_order_intent() Request::get paypal order intent WC 11.2.2
private function get_paypal_order_intent(): string {
$payment_action = $this->gateway->get_option( 'paymentaction' );
if ( 'authorization' === $payment_action ) {
return PayPalConstants::INTENT_AUTHORIZE;
}
return PayPalConstants::INTENT_CAPTURE;
}