Support » Plugin: WooCommerce » Payment API adding meta to order

  • In my payment gateway plugin, in the process_payment function, to add some data gathered in a direct payment method, I’m using:

    update_post_meta( $order_id, ‘my_data’, esc_attr($_POST[‘my_data’]));

    This works, and I can access it in the admin order page, but is it the correct woocommerce way?

  • The topic ‘Payment API adding meta to order’ is closed to new replies.