# extendify/3.1.0/src/Agent/lib/wp.js

Extendify, version 3.1.0. 18 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.1.0/code/src/Agent/lib/wp.js
- Raw: https://pluginprobe.com/plugins/extendify/3.1.0/raw/src/Agent/lib/wp.js
- Modified: 2026-02-26T23:48:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/3.1.0/code/src/Agent/lib/wp.js#L10-L20`.

```javascript
import apiFetch from '@wordpress/api-fetch';

export const updateOption = async (option, value) => {
	await apiFetch({
		path: '/extendify/v1/agent/options',
		method: 'post',
		data: { option, value },
	});
};

export const getOption = (option) => {
	const params = new URLSearchParams({ option: String(option) });
	return apiFetch({
		path: `/extendify/v1/agent/options?${params.toString()}`,
		method: 'GET',
	});
};

```
