Hi,
in which payment method this occurs? Which PHP version do you use?
All the best,
Karolina
Hi Karolina,
Thanks for your reply.
We are using Sisow payments, perhaps it has something to do with that.
https://nl.wordpress.org/plugins/sisow-for-woocommerce/
PHP version 7.0.
After woocommerce update:
PHP Fatal error: Unsupported operand types in wp-content/plugins/woocommerce-pay-for-payment/inc/class-pay4pay-admin.php on line 259
in combination with Mollie payments
https://nl.wordpress.org/plugins/mollie-payments-for-woocommerce/
-
This reply was modified 5 years, 7 months ago by
highor.
@suite7 Hi, on which payment type you have this issue? I have installed Sisow payments and tried three of payments available and everything was working fine.
@highor Hi, I have contacted a Mollie payments for a helping hand, since I can’t test it myself because an account and API key are necessary to run their plugin. I will keep you updated.
Guys, could you edit the plugin and add the following line in class-pay4pay-admin.php?
var_dump($options);
before this line:
$options+= $extra;
Then reproduce the issue again and post the var_dump();
value here?
Hi Karolina
I am one of the developers of the Mollie plugin, can we discuss this mollie@paytium.nl?
Kind regards
David
Hi David ( @davdebcom ),
I wrote you couple of days ago, but maybe got stopped by spamfilter or so? Could you check it?
Best regards,
Karolina
Hi Karolina
Didn’t get it… Whats your email?
Kind regards
David
karolina@kybernaut.cz
Have you tried the solution posted above? Did it work?
Best regards,
Karolina
Result of the var_dump is ‘false’.
Checked your code around line 230. It builds the option name for the gateway settings by getting the section from the url, in the case of Mollie Bank transfer that’s ‘mollie_wc_gateway_banktransfer’. Then adds ‘woocommerce_’ as prefix and ‘_settings’ as postfix. But the Mollie plugin doesn’t use this format, it uses:
mollie_wc_gateway_banktransfer_settings, without the woocommerce_ prefix.
Would you consider adding a fix for the format that Mollie uses to your codebase so our users can also use your plugin?
Just realised, we might not be the only plugin that doesn’t have the ‘woocommerce_’ prefix, so maybe it might be even better for your plugin to check if get_option( ‘woocommerce_’ . $current_format . ‘_settings’ ); returns a value, and otherwise search for get_option( $current_format . ‘_settings’ ); as a fall back. Might fix the issue with the Sisow plugin too.
-
This reply was modified 5 years, 3 months ago by
davdebcom.
Hi @davdebcom, thanks for finding that out. Do you feel like creating a pull request? https://github.com/vyskoczilova/woocommerce-payforpayment the way you just described above – with checking another get option looks good to me.
@davdebcom Merged, but I had to change some lines because you broke it down. Could you please retest? Thanks for cooperation.
Fixed with plugin version 2.0.7, thanks to @davdebcom who helped with the development.