Changed api method

This commit is contained in:
Fernando Marichal 2021-06-18 13:30:25 -03:00
parent f3c16eafc2
commit 1089048afd
2 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,10 @@
<?php
register_woocommerce_admin_test_helper_rest_route(
'/tools/get-cron-list/v1',
'tools_get_cron_list'
'tools_get_cron_list',
array(
'methods' => 'GET',
)
);
register_woocommerce_admin_test_helper_rest_route(
'/tools/trigger-selected-cron/v1',

View File

@ -15,7 +15,7 @@ export function* getCronJobs() {
try {
const response = yield apiFetch( {
path,
method: 'POST',
method: 'GET',
} );
yield setCronJobs( response );
} catch ( error ) {