• Resolved jnhghy

    (@jnhghy)


    Hello,

    Issue found in 7.3.5

    In mollie-payments-for-woocommerce/src/Gateway/Voucher/VoucherModule.php

    you added an action for both ‘edited_product_cat’ and ‘create_product_cat’ and run the voucherTaxonomyCustomMetaSave method as callback for the hook.

    in the voucherTaxonomyCustomMetaSave method you also have the following line of code:

    $metaOption = sanitize_text_field(wp_unslash($_POST([‘_mollie_voucher_category’])));

    line 204 in the file.

    This has an error in it, if we split the code we can see this:

    $_POST([‘_mollie_voucher_category’]) in which you use $_POST as a function not as a variable so the ( ) are extra ( and cause an error ).

    It should most likely be $_POST[‘_mollie_voucher_category’].

    Also in this method you should probably check if $_POST has the key you are trying to use before using it as it might throw warnings in the logs.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @jnhghy

    Thanks for the feedback. This issue has already been addressed for the upcoming update 7.3.6.
    In the meantime, you could work around it by downgrading to the previous version 7.3.4 or disabling the Voucher gateway.

    Kind regards,
    Niklas

    Thread Starter jnhghy

    (@jnhghy)

    Hello @niklasinpsyde,

    Thanks for the reply and the suggestion!

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @jnhghy

    A pre-release version for the new update is now available on GitHub here. We would appreciate it if you could give it a try and let us know how this works for you.

    Thank you!

    Kind regards,
    Niklas

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    We have not heard back from you in a while, so I’m marking this thread as resolved. I hope the information provided above helped you out.
    If you have any further questions, we recommend getting in touch with the Mollie Support Team directly.
    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP Error in WP hook function 7.3.5’ is closed to new replies.