We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batch update setting options
The example data is not related to the batch call being made.
It appears to be a copy paste from the data used for Batch update product variations
The cURL example is good but the Node.js, PHP, Python and Ruby calls need updating.
The same data example could be applied to Node.js as follows:
const data = { update: [ { id: "woocommerce_allowed_countries", value: "all" }, { id: "woocommerce_demo_store", value: "yes" }, { id: "woocommerce_currency", value: "GBP" } ] }; WooCommerce.post("settings/general/batch", data) .then((response) => { console.log(response.data); }) .catch((error) => { console.log(error.response.data); });
with similar updates for PHP:
<?php $data = [ 'update' => [ [ 'id': => 'woocommerce_allowed_countries', 'value' => 'all' ], [ 'id' => 'woocommerce_demo_store', 'value' => 'yes' ], [ 'id' => 'woocommerce_currency', 'value' => 'GBP' ] ] ]; print_r($woocommerce->post('settings/general/batch', $data)); ?>
Python:
data = { "update": [ { "id": "woocommerce_allowed_countries", "value": "all" }, { "id": "woocommerce_demo_store", "value": "yes" }, { "id": "woocommerce_currency", "value": "GBP" } ] } print(wcapi.post("settings/general/batch", data).json())
and Ruby:
data = { update: [ { id: "woocommerce_allowed_countries", value: "all" }, { id: "woocommerce_demo_store", value: "yes" }, { id: "woocommerce_currency", value: "GBP" } ] } woocommerce.post("settings/general/batch", data).parsed_response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The example data is not related to the batch call being made.
It appears to be a copy paste from the data used for Batch update product variations
The cURL example is good but the Node.js, PHP, Python and Ruby calls need updating.
The same data example could be applied to Node.js as follows:
with similar updates for PHP:
Python:
and Ruby:
The text was updated successfully, but these errors were encountered: