• Resolved robotninja

    (@robotninja)


    The sequential order plugin is conflicting with QuickPay and is resulting in the following error on checkout: order_id: already exists on another payment

    What is happening is when the most recent order is permanently deleted, the sequential order number plugin reuses that order number, however quickPay already thinks this order number exists.

    To replicate:
    1. install the Sequential Order Numbers plugin: https://wordpress.org/plugins/woocommerce-sequential-order-numbers/
    2. Purchase a product and complete checkout with QuickPay
    3. Trash then permanently delete that order in WC orders table
    4. Try to purchase another product

    Result: http://pic.pros.pr/0e941774188e

    Should you be sending the actual order postID not the sequential order number to QuickPay?

    Cheers,

    Matt

Viewing 1 replies (of 1 total)
  • Plugin Author PerfectSolution

    (@perfectsolution)

    Hi Matt,

    I believe sending the order id instead of the post ID is the correct approach. This is how most merchants want it.

    I can think of a way or two to optimize this in the future, but it is on the mid/long-term roadmap.

    If you want, you may manipulate the order number sent to QuickPay yourself. This can be done through the following filter: woocommerce_quickpay_order_number_for_api

    /**
     * @param string $order_number
     * @param WC_Order $order
     * @param bool $recurring
     */
    function filter_woocommerce_quickpay_order_number_for_api($order_number, $order, $recurring) {
    // Manipulate the order number somehow
    return $order_number;
    }
    add_filter('woocommerce_quickpay_order_number_for_api', 'filter_woocommerce_quickpay_order_number_for_api', 100, 3);
Viewing 1 replies (of 1 total)

The topic ‘WooCommerce Sequential Order Numbers plugin conflict’ is closed to new replies.