Settings
The admin settings API allows you to do the following:
fetch setting sections
fetch a section's list of fields
read, update and delete setting options for ACFW.
GET: /wp-json/coupons/v1/settings/sections
Fetch all sections of ACFW settings.
Requirements:
Logged-in user
user role with
manage_woocommerce
user capability
Method | Endpoint |
GET | /wp-json/coupons/v1/settings/sections |
Request Headers | Required | Type | Description |
section | false | string | Slug of the current section. When filled, it will preload the section's fields. |
GET: /wp-json/coupons/v1/settings/sections/{section_id}
Get fields for a given setting section
Requirements:
Logged-in user
user role with
manage_woocommerce
user capability
Method | Endpoint |
GET | /wp-json/coupons/v1/settings/sections/{section_id} |
GET: /wp-json/coupons/v1/settings/{setting_id}
Get the value of an ACFW setting option.
Method | Endpoint |
GET | /wp-json/coupons/v1/settings/{setting_id} |
PUT: /wp-json/coupons/v1/settings/{setting_id}
Update value of an ACFW setting option.
Requirements:
Logged-in user
user role with
manage_woocommerce
user capability
Method | Endpoint |
PUT | /wp-json/coupons/v1/settings/{setting_id} |
Query Parameters | Required | Type | Description |
value | true | mixed | Value to update |
type | false | string | Format type of value. Default as |
DELETE: /wp-json/coupons/v1/settings/{setting_id}
Update value of an ACFW setting option.
Requirements:
Logged-in user
user role with
manage_woocommerce
user capability
Method | Endpoint |
DELETE | /wp-json/coupons/v1/settings/{setting_id} |
Last updated