Support » Plugin: Gift Aid for WooCommerce » Fatal Error (Running PHP 5.6)

  • Resolved Ben



    Since upgrading to WooCommerce 3 I’ve been receiving PHP Fatal errors, detailed in the error_log output as:

    Using $this when not in object context in /gift-aid-for-woocommerce/php/class-settings.php on line 77

    I’m currently running PHP 5.6.

    I’m not sure whether you need any further info, if you do just let me know.

    Thanks in advance.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author davetgreen


    Hi @bgamlin,

    The plugin isn’t yet tested with WC 3.X but I’ll be carrying out that testing next week at some point.

    I don’t believe this error is due to the newer version of WooCommerce. I’ve had similar errors reported that have been resolved by running PHP 5.6 or higher, so it’s unusual that you’re getting a fatal error.

    Just to double check, are you using the latest version of Gift Aid?


    I am using version 1.3.3 and version 3.0.7 WooCommerce. I have PHP5.6 setup

    I also receive a similar error:

    Fatal Error: Using $this when not in object context in /home…./gift-aid-for-woocommerce/php/class-checkout.php on line 164

    this happens after a payment has been made after using a credit card and has been redirected back to the main site

    Any ideas on how to fix this please?

    Many thanks


    Plugin Author davetgreen


    hello @feartech, apologies for the delay, I’ve been on leave.

    Looking into this now for you. Response later today,.

    thanks! i am out most of the day but will check later on!

    Plugin Author davetgreen


    hi @feartech this is a confirmed minor bug that I’ve fixed. Version 1.3.4 is now up for installation. Let me know if you have any more issues!

    i have someone to test it later, hopefully tomorrow and will report back


    Plugin Author davetgreen


    @feartech fingers crossed that this is working ok for you now?

    yes! i have just heard back and all is working!

    sorry for late reply, had to go through a chain of 3 different people 🙂

    thanks again for your hard work

    Plugin Author davetgreen


    @feartech great news! If you get a minute I’d be really grateful if you could leave a rating.

    All the best,

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