I can enable payment gateways with below command:

wp wc payment_gateway update paypal --user=1 --enable=true path=/www

#This works well

However, when I try to update a setting of the gateway, it does not seem to work. I have tried many different variables in settings parameter, however nothing seems to work.

wp wc payment_gateway update paypal --user=1 --settings="{'enabled':false}" --path=/www

Success: Updated payment_gateway paypal.
#It says updated, but the value is not saved.

As mentioned in the FAQ, I have tried [ ] as said here too. I have looked in to the REST API documentation, but couldn't find a working example.

What I get is a success mesage, however the value is not updated. Does anyone have an experience with that?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.