• Resolved horgster

    (@horgster)


    Hi!

    I have noticed that with one of the latest releases of “VIPPS Express Checkout” sets the attribute “Order Refund Amount” in WooComerce to the value NULL instead of the value 0 when purchasing items.

    This problem started to occur in one of the released in November 2022.

    Running 5.8.0 of WooComerce.

    Can you please fix this as this causes issues with our accounting system to fail ??

    Thanks
    Horgster

    • This topic was modified 2 years, 12 months ago by horgster.
    • This topic was modified 2 years, 12 months ago by horgster.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Iver Odin Kvello

    (@iverok)

    What value is this specifically – the ‘_vipps_refunded’ meta value? The plugin doesn’t modify any other values unless you actually refund something, but we can of course set a value like that to 0 anyway (if it is NULL).

    If it is the _vipps_refunded value, then we can of course ensure it is present with the value 0 if you need it. Right now it may or may not be present depending on various factors.

    Thread Starter horgster

    (@horgster)

    Hi @iverok

    Thanks for quick reply!

    After some digging, I can see that the meta value ‘_vipps_refunded’ presents the data correctly. Providing zero (0) and not NULL.

    The ‘_vipps_refunded’ provides the value in x100, eg. 1nok is 100 as value.

    It is the WooCommerce meta value ‘_order_refund_amount’ that is NULL when the value should be 0.

    If an product is refunded, I can see the correct value that is refunded (value 1 of 1kr and not the value x100 as in ‘_vipps_refunded’)

    I think it is smart to populate this meta value in WooCommerce.

    Best Regards
    Horgster

    • This reply was modified 2 years, 12 months ago by horgster.
    • This reply was modified 2 years, 12 months ago by horgster.
    • This reply was modified 2 years, 12 months ago by horgster.
    Plugin Author Iver Odin Kvello

    (@iverok)

    Sure; it’s just that we don’t explicitly do anything with _order_refund_amount. It has probably to do with how the order is created; I’ll look into it.

    Plugin Author Iver Odin Kvello

    (@iverok)

    Looking at the WooCommerce code, I in fact see nothing that would initialize the _refund_amount unless something is actually refunded. The reason you get “vipps” values for it is just that that gets returned from Vipps by the api calls, so they get stored anyhow.

    Are you getting a 0 _refund_amount on orders where there is no refund using other payment methods? I would expect there to be no entry in the meta table, which would give a NULL if you do a join there.

    Would you be able to share the SQL that gives you the nulls here?

    Thread Starter horgster

    (@horgster)

    Hi @iverok

    I haven’t checked the SQL DB, but after some digging, I noticed that this issue should be related to another plugin on how the NULL Value is handled.

    So as you say, in WooCommerce, this meta value seems to set to NULL when no refund is yet carried out. I cant test with other payments methods as I only have VIPPS ??

    Think we can close this thread as it seems not to be related to VIPPS at all.
    Sorry for any trouble.

    Best Regards
    Horgster

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘VIPPS Express Checkout – “Order Refund Amount” is set to NULL’ is closed to new replies.