WordPress at Your Fingertips
function is not described


Stripe::add_order_meta() private WC 1.0

Handles adding information about the payment request type used to the order meta.

{} It's a method of the class: Stripe{}

No Hooks.


null. Nothing.


// private - for code of main (parent) class only
$result = $this->add_order_meta( $order, $payment_request_type );
$order(WC_Order) (required)
The order being processed.
$payment_request_type(string) (required)
The payment request type used for payment.

Code of Stripe::add_order_meta() WC 5.6.0

private function add_order_meta( \WC_Order $order, string $payment_request_type ) {
	if ( 'apple_pay' === $payment_request_type ) {
		$order->set_payment_method_title( 'Apple Pay (Stripe)' );

	if ( 'payment_request_api' === $payment_request_type ) {
		$order->set_payment_method_title( 'Chrome Payment Request (Stripe)' );