Okay
  Public Ticket #4101430
INVOICE PAYMENT adds payment status immidiately
Closed

Comments

  • Hassan started the conversation

    Subject: Issue with Invoice Payment Marked as Paid in DEAR/Cin7 Despite "On Hold" WooCommerce Status

    Hi,

    I’m experiencing an issue related to the Invoice Payment option.

    We’ve integrated WooCommerce with Cin7 (Dear Systems) using webhooks. When an order is placed using the Invoice Payment method, the order is automatically marked as paid in Dear/Cin7 — even though its status remains "on hold" in WooCommerce.

    It seems that B2BKing’s "Invoice Payment" method might be triggering something that flags the order as paid during the sync, but I’m not entirely sure how. I’ve also checked the database and couldn't find any relevant meta key or marker indicating this behavior.

    Could you please clarify:

    1. Does B2BKing’s "Invoice" payment method automatically indicate that the order is paid (even if WooCommerce shows "on hold")?

    2. Is there a way to adjust this so that orders sent to Cin7/Dear are marked unpaid until we manually confirm payment?

    Any insight or workaround would be greatly appreciated. Thanks in advance!

    Best regards,

     

  •  2,460
    WebWizards replied

    Hi Hassan,

    I double checked that and also looked over our invoice gateway code, but I can tell you B2BKing does NOT mark those orders as paid. The only exception is if the order total is 0 (free orders), which I don't think is the case here.

    Also the status we are using (on-hold) is normally a status that is not paid for.

     

    Please check the following: When you edit the order in the backend, what do you see here at the top?

    8923685953.png

    Does it say "Paid on X date" like here? (normally it should not say that for Invoice orders):

    3946047333.png

     

    It may have to do with a conflict or something else interfering with on-hold orders. You could try a different status such as processing, by adding this code snippet to your site:

    add_filter('b2bking_invoice_payment_order_status', function($status, $order){
            return 'processing';
    }, 10, 2);

    With this snippet it will automatically set new orders placed via the invoice gateway to 'processing' (or you can change processing to any other custom status).

     

    Kind regards,

    Stefan