WordPress at Your Fingertips
function is not described

WC_Gateway_Paypal_IPN_Handler::save_paypal_meta_data() protected WC 1.0

Save important data from the IPN to the order.

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

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->save_paypal_meta_data( $order, $posted );
$order(WC_Order) (required)
Order object.
$posted(array) (required)
Posted data.

Code of WC_Gateway_Paypal_IPN_Handler::save_paypal_meta_data() WC 5.6.0

protected function save_paypal_meta_data( $order, $posted ) {
	if ( ! empty( $posted['payment_type'] ) ) {
		update_post_meta( $order->get_id(), 'Payment type', wc_clean( $posted['payment_type'] ) );
	}
	if ( ! empty( $posted['txn_id'] ) ) {
		update_post_meta( $order->get_id(), '_transaction_id', wc_clean( $posted['txn_id'] ) );
	}
	if ( ! empty( $posted['payment_status'] ) ) {
		update_post_meta( $order->get_id(), '_paypal_status', wc_clean( $posted['payment_status'] ) );
	}
}