Automattic\WooCommerce\StoreApi\Payments
PaymentContext::set_payment_data()
Set payment data context.
Method of the class: PaymentContext{}
No Hooks.
Return
null
. Nothing (null).
Usage
$PaymentContext = new PaymentContext(); $PaymentContext->set_payment_data( $payment_data );
- $payment_data(array)
- Array of key value pairs of data.
Default: []
PaymentContext::set_payment_data() PaymentContext::set payment data code WC 9.3.1
public function set_payment_data( $payment_data = [] ) { $this->payment_data = []; foreach ( $payment_data as $key => $value ) { $this->payment_data[ (string) $key ] = (string) $value; } }