Preview: wp.js
Size: 420 B
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/extendify_old/src/Agent/lib/wp.js
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',
});
};
Directory Contents
Dirs: 1 × Files: 14