• Hi,
    I installed your plugin but cod payment showed up but not the cod fee on my selected shipping methods.

    Having a look at your code, I changed at “woocommerce_cart_calculate_fees” action function array_intersect with array_intersect_key and it worked fine.

    Please, have a look because i don′t know if it is failing for everybody else…

    Thanks for your plugin

Viewing 3 replies - 1 through 3 (of 3 total)
  • @perezdans came here to post the same.

    Same problem for me.
    Thank you for the fix @perezdans .
    Thank you for the plugin Andreas Sofantzis

    Plugin Author Andreas Sofantzis

    (@asofantzis)

    Really sorry for the late reply and thanks for pointing that.

    The truth is I couldn’t replicate the same issue, in fresh install it was working fine, I don’t think we should intersect with keys as keys are indexed numbers 0,1,2,3 etc where most of the times two arrays would intersect as 0=0 etc. BUT maybe another plugin causes the keys to take string values where then several things can go wrong.

    Nevertheless I added a simpler way to check if user’s chosen shipping method has enabled extra cod fee for chosen shipping method, a simpler in_array should work now

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin was not working. Had to make a change’ is closed to new replies.