• Resolved Matt Pramschufer

    (@mattpramschufer)


    We are getting the following fatal error and coupon does not apply.

    [21-Jun-2023 13:46:52] WARNING: [pool www] child 24140 said into stderr: "NOTICE: PHP message: PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /var/www/domain.com/wp-content/plugins/url-coupons-for-woocommerce-by-algoritmika/includes/class-alg-wc-url-coupons-core.php:293"
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @mattpramschufer,

    Sorry for the late reply.

    Could you please let us know if the issue is occurring only for guest users or also for logged-in users? Please let us know.

    Kind regards,
    Moshtafizur

    Thread Starter Matt Pramschufer

    (@mattpramschufer)

    Thanks for getting back @moshtafizur01 this issue happened to both logged in and logged out users.

    I was able to correct the error by modifying line 291 to have

    $applied_coupons = alg_wc_url_coupons_data_storage_get( 'alg_wc_url_coupons_applied_coupons', array() );

    instead of

    $applied_coupons = alg_wc_url_coupons_data_storage_get( 'alg_wc_url_coupons_applied_coupons');

    The array flag will then make sure that any items you get from the alg_wc_url_coupons_data_storage_get function will be an array.

    Hi @mattpramschufer,

    I am glad to know the issue has been resolved.

    However, I have escalated this with our development team so that they include this fix in the next version of the plugin.

    In the meantime, if you have any other questions, please let us know.

    Kind regards,
    Moshtafizur

    Thread Starter Matt Pramschufer

    (@mattpramschufer)

    Thanks!

    Dear @mattpramschufer,

    I hope you are well today. Following a thorough discussion with our development team, we have identified that the issue you encountered has already been resolved in the latest version (1.6.8) of our plugin. It is possible that the issue you faced is associated with using an older version of the plugin.

    Therefore, to ensure a seamless and optimal experience, we highly recommend updating the plugin to its latest version.

    If you have any further questions or require any assistance during the update process, please reach out to us.

    Kind regards,
    Moshtafizur

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal Error’ is closed to new replies.