Title: PHP Error in WP hook function 7.3.5
Last modified: March 1, 2023

---

# PHP Error in WP hook function 7.3.5

 *  Resolved [jnhghy](https://wordpress.org/support/users/jnhghy/)
 * (@jnhghy)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-error-in-wp-hook-function-7-3-5/)
 * 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](https://wordpress.org/support/users/niklasinpsyde/)
 * (@niklasinpsyde)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-error-in-wp-hook-function-7-3-5/#post-16521187)
 * Hi [@jnhghy](https://wordpress.org/support/users/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](https://downloads.wordpress.org/plugin/mollie-payments-for-woocommerce.7.3.4.zip)
   or disabling the Voucher gateway.
 * Kind regards,
   Niklas
 *  Thread Starter [jnhghy](https://wordpress.org/support/users/jnhghy/)
 * (@jnhghy)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-error-in-wp-hook-function-7-3-5/#post-16524322)
 * Hello [@niklasinpsyde](https://wordpress.org/support/users/niklasinpsyde/),
 * Thanks for the reply and the suggestion!
 *  Plugin Support [Syde Niklas](https://wordpress.org/support/users/niklasinpsyde/)
 * (@niklasinpsyde)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-error-in-wp-hook-function-7-3-5/#post-16524763)
 * Hi [@jnhghy](https://wordpress.org/support/users/jnhghy/)
 * A pre-release version for the new update is now available on [GitHub here](https://github.com/mollie/WooCommerce/releases/tag/7.3.6-beta).
   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](https://wordpress.org/support/users/niklasinpsyde/)
 * (@niklasinpsyde)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-error-in-wp-hook-function-7-3-5/#post-16555909)
 * 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](https://www.mollie.com/contact/merchants)
   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.

 * ![](https://ps.w.org/mollie-payments-for-woocommerce/assets/icon-256x256.png?
   rev=3090580)
 * [Mollie Payments for WooCommerce](https://wordpress.org/plugins/mollie-payments-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mollie-payments-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mollie-payments-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/mollie-payments-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mollie-payments-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mollie-payments-for-woocommerce/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 5 replies
 * 2 participants
 * Last reply from: [Syde Niklas](https://wordpress.org/support/users/niklasinpsyde/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/php-error-in-wp-hook-function-7-3-5/#post-16555909)
 * Status: resolved