• Hello,
    I’m using the Payzen plugin for my paiement via CB, the order ID isn’t the custom order ID used by your plugin. Do you know how to force the custom order ID everywhere ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @augustinore,

    I’m not familiar with Payzen plugin, however it looks like they are using order ID and not order number. Basically you would probably need to modify Payzen plugin code (or better ask developers to include it in next plugin update) and instead of $order->get_id() use $order->get_order_number() – this will return modified (i.e. custom) order number.

    If $order_id variable is used (and not $order->get_id()), here is the snippet how to get custom order number by order ID (also $order_id in snippet can be false, if you are displaying custom number for the current order):

    
    $order = wc_get_order( $order_id);
    echo $order->get_order_number();
    

    Hope that helps.

    Ghostpengy

    (@ghostpengy)

    Worked like a charm, could be added to installation instructions on the plugin page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Order ID not change when paiement with CB’ is closed to new replies.