Replies: 1 comment
|
Use both nested keys as the key path, and use JSON format so the value remains a boolean instead of becoming the string wp option patch update OPTION_NAME progress delete_rate true --format=json --url=https://example.test
wp option get OPTION_NAME --format=json --url=https://example.testReplace |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I don't know how to update a nested value with "wp option patch". I need to update the value of the key 'delete_rate' that is in this associative array that i have on options:
( I use wp-cli on PhP with exec() and popen() )
-Update: Now i do the patch update successfully but the changes doesn't apply to the database. When i get the options with wp-cli it appers changed but when i see the database not.
a:8:{s:8:"settings";a:1:{s:10:"percentage";b:0;}s:5:"roles";a:6:{s:12:"abdm_customer1";a:2:{s:9:"role_name";s:7:"customer1";s:9:"role_rate";s:12:"rate_tarifa5";}s:12:"abdm_customer2";a:2:{s:9:"role_name";s:7:"customer2";s:9:"role_rate";s:21:"rate_t._latinoamerica";}s:20:"abdm_customer3";a:2:{s:9:"role_name";s:15:"customer3";s:9:"role_rate";s:21:"rate_t._esp";}s:16:"abdm_customer4";a:2:{s:9:"role_name";s:11:"customer4";s:9:"role_rate";s:14:"rate_tarifa_21";}s:17:"abdm_profesional1";a:2:{s:9:"role_name";s:12:"Profesional1";s:9:"role_rate";s:14:"rate_tarifa_21";}s:9:"abdm_ruth";a:2:{s:9:"role_name";s:4:"ruth";s:9:"role_rate";s:21:"rate_t._latinoamerica";}}s:5:"rates";a:3:{s:12:"rate_tarifa5";a:1:{s:9:"rate_name";s:7:"Tarifa5";}s:21:"rate_t._latinoamerica";a:1:{s:9:"rate_name";s:16:"T. Latinoamerica";}s:21:"rate_t._esp";a:1:{s:9:"rate_name";s:16:"T. ESP";}}s:10:"surcharges";a:0:{}s:7:"notices";a:0:{}s:14:"customer_types";a:3:{i:0;s:8:"Customer";i:1;s:12:"Professional";i:2;s:27:"Professional with surcharge";}s:8:"progress";a:1:{s:11:"delete_rate";b:0;}s:12:"withholdings";a:0:{}}
All reactions