Claim your freedom to choose the perfect partner for your multi-vendor journey.

FREEDOM25

Celebrate the festive season by giving your marketplace a powerful lift!

FESTIVE20

5.0.0
Multi-store. Franchise. Facilitator. AI tools.
Everything your marketplace needs - now in one platform.
Power your marketplace dreams with unbeatable Black Friday deals!

MVXBLACK30

Supercharge your marketplace vision with unstoppable Cyber Monday deals!

MVXCYBER30

Holiday cheer, bigger savings
Take 25% off-because your marketplace deserves a gift too.

happyholiday

Class-MVX-order.php breaking payment / checkout

Resolved
Viewing 5 reply threads
  • Author
    Posts
    • #221757
      dennis
      Participant

      Hey!

      In the class-mvx-order.php you are on line 580 and 581 trying to set:

      ‘_customer_ip_address’
      ‘_customer_user_agent’

      Through update_meta_data function on the WC_Order object.

      Problem is, that this is internal fields, and therefore should be set with set_customer_ip_address and set_customer_user_agent.

      This is making my whole checkout break, so the customers can’t go payment, since I get the “is_internal_meta_key” error.

      Can you fix it?

    • #221763

      Hi @dennis, sorry to hear that you have faced this issue.

      However can you please let us know how can we recreate the same on our end, so we can try to recreate the same and assist you with the solution.

    • #221815
      dennis
      Participant

      You need to just look in the class-mvx.php on the mentioned lines 🙂

      The problem is, that you don’t check if HPOS is enabled.

      IF HPOS is enabled, you should use the built-in WooCommerce functions for setting the two variables.
      Because it is an internal key it can not be set by the update_meta_data function anymore 🙂

      So this is the current code, but you should do something like this:

      // Add vendor order meta data
      $order_meta = apply_filters(‘mvx_vendor_order_metas’, array(
      ‘_payment_method’,
      ‘_payment_method_title’,
      ‘_customer_user’,
      ‘_prices_include_tax’,
      ‘_order_currency’,
      // ‘_order_key’,
      ‘_customer_ip_address’,
      ‘_customer_user_agent’,
      ));
      foreach ($order_meta as $key) {
      if($MVX->hpos_is_enabled){
      if($key == ‘_customer_ip_address’){
      $vendor_order->set_customer_ip_address( $order->get_customer_ip_address() );
      } else if($key == ‘_customer_user_agent’){
      $vendor_order->set_customer_user_agent( $order->get_customer_user_agent() );
      } else {
      $vendor_order->update_meta_data($key, $order->get_meta( $key, true));
      }
      } else {
      update_post_meta($vendor_order->get_id(), $key, get_post_meta($order->get_id(), $key, true));
      }
      $vendor_order->save();
      }

    • #221816

      Hi there, Thanks for sharing the details with us. Let me share this with the dev team and once I hear back from them I will keep you posted accordingly.
      Thanks for your understanding and cooperation.

    • #235461

      Hello! I wanted to check in and see if you’re still experiencing any issues on your end.

    • #237105

      Hello, It’s been a while since we last heard from you, and we hope your query has been resolved.

      We will be closing this thread for now. If you need any assistance or encounter any issues, please don’t hesitate to create a new support ticket—we’ll be happy to help!

Viewing 5 reply threads
  • The topic ‘Class-MVX-order.php breaking payment / checkout’ is closed to new replies.
Shopping Cart
Scroll to Top