Update email pre-fill endpoint to be experimental (https://github.com/woocommerce/woocommerce-admin/pull/7602)

This commit is contained in:
Adrian Duffell 2021-08-31 16:38:21 +08:00 committed by GitHub
parent 6d23ab7ea1
commit 2ce0cd9519
2 changed files with 6 additions and 2 deletions

View File

@ -35,7 +35,9 @@ export function* getProfileItems() {
export function* getEmailPrefill() {
try {
const results = yield apiFetch( {
path: WC_ADMIN_NAMESPACE + '/onboarding/profile/get_email_prefill',
path:
WC_ADMIN_NAMESPACE +
'/onboarding/profile/experimental_get_email_prefill',
method: 'GET',
} );

View File

@ -61,9 +61,11 @@ class OnboardingProfile extends \WC_REST_Data_Controller {
'schema' => array( $this, 'get_public_item_schema' ),
)
);
// This endpoint is experimental. For internal use only.
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/get_email_prefill',
'/' . $this->rest_base . '/experimental_get_email_prefill',
array(
array(
'methods' => \WP_REST_Server::READABLE,