• Resolved francisguarderas

    (@francisguarderas)


    Hey Guys, loving the plugin so far.

    When I go to the checkout for a Gift-Card (yith gift cards) (which should be disabled given it is a digital product, I get this error message:

    “Notice: Undefined offset: 0 in /xxxx/wp-content/plugins/wc-smart-cod/public/class-wc-smart-cod-public.php on line 457”

    Followed by the regular COD unavailable message.

    Is there a way to fix this issue, or at least remove this notice?

    View post on imgur.com

    Thanks!

    Francisco

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author FullStack-ing

    (@fullstackhouse)

    Hi Francisco,

    This is only a notice, which should not be visible on a production server with the WP_DEBUG set to false ( on wp-config.php ). So there is no need to worry about this.

    Nevertheless we debugged your case and the strange thing is that we cannot reproduce this notice.

    I suspect you are using a shipping plugin or an outdated woocommerce version?

    Anyway, I created a version that should eliminate your issue, please download from here -> https://we.tl/UBzFYJlXA0 and replace the class-wc-smart-cod-public.php file.

    Please keep in mind that’s a temporary solution to help you out on this and preferably just disable the notices – warnings on your server ( that’s how a production server is intended to work, just set WP_DEBUG to false on your wp-config.php )

    The main reason I suspect, is the one I told you above
    a) A shipping plugin ( if that’s correct, please send me the name of the plugin )
    b) An outdated woocommerce version ( if so, please update )

    Best Regards

    Thread Starter francisguarderas

    (@francisguarderas)

    Hi,

    Thanks for the quick response, I really appreciate your help.

    You were right about the shipping plugin. I deactivated the WooCommerce Local Pickup Plus Plugin and the Notice went away.

    I replaced the class-wc-smart-cod-public.php file and have set the WP_DEBUG to false, but the notice remains visible. The only way I have been able to remove the Notice is by deactivating WooCommerce Local Pickup Plus Plugin (which unfortunately I really need for my site and haven’t been able to find an alternative).

    It might be useful to point out that the only product for which the notice appears is when I try to buy a Gift Card (Yith Gift Cards Plugin). All of the other regular products are fine.

    I also noticed that the “Round Up / Round Down” feature for the plugin is not working properly on my site in case there is anything I can do to fix this. Also, I am not able to select any restrictions for specific product categories, specific products or shipping classes. the box is empty and I can’t type any input. I hope this helps you make the plugin even better, loving it so far :).

    View post on imgur.com

    View post on imgur.com

    -EDIT* – I am running the latest versions of all plugins just in case…

    Thanks again for all your help!

    Best Regards,

    Francisco

    Plugin Author FullStack-ing

    (@fullstackhouse)

    Hi,

    The rounding factor is only applied when your COD extra fee is set to “%” instead of “Fixed”.

    Probably you are not seeing this option due to a select2 javascript error. That’s the same reason the product and product categories box not working.

    I’m pretty sure that’s a conflict with one or more bad coded plugin of yours.

    I will check the WooCommerce Local Pickup Plus Plugin issue with the notice, but I’m pretty sure the file I send you will clean this notice up.

    From your side please send your WooCommerce System Status ( from WooCommece / Status ), so I can assist you further.

    Best Regards

    Plugin Author FullStack-ing

    (@fullstackhouse)

    Also, please disable your plugins, one by one, until the product and product category boxes become functional. This way we can spot which plugin causes the conflict.

    About the notice with local pickup plugin, please make sure you replace ( overwrite ) the file wc-smart-cod-public.php, with the one I send you, correctly. I just tested and the notice goes away.

    Best Regards

    Thread Starter francisguarderas

    (@francisguarderas)

    Hi,

    The file worked perfectly as intended, I was able to remove the Notice.

    I have been trying to fix the products/categories input issue by removing plugins, but haven’t been able to find the one causing conflict yet.

    In the backend I get this warning in case it might be helpful:
    Warning: First parameter must either be an object or the name of an existing class in /***/wp-content/plugins/wc-smart-cod/admin/class-wc-smart-cod-admin.php on line 1081

    You can see the Woocommerce System Status here:
    https://drive.google.com/file/d/1_QUcohNWVH-RE5Gmj2X0ety-EhjVvvG_/view?usp=sharing

    Thanks for your help ?? The plugin is working perfectly in every other respect.

    Cheers,

    Francisco

    Plugin Author FullStack-ing

    (@fullstackhouse)

    Hi Francisco,

    Yes, that did help. We going to release an update supporting your installation, as soon as possible.

    Best Regards

    Plugin Author FullStack-ing

    (@fullstackhouse)

    Hi Francisco,

    We released an update fixing all of your issues.
    It includes the fix I send you before, so you don’t need to replace anything. Just update.

    Please let me know if everything worked as expected.

    Best Regards

    Plugin Author FullStack-ing

    (@fullstackhouse)

    Hi,
    I’m waiting for your reply!

    Best Regards

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Smart COD – Gift-Card Error’ is closed to new replies.