Submit browser migration batches to the form URL
All checks were successful
WordPress release / release (push) Successful in 5s
All checks were successful
WordPress release / release (push) Successful in 5s
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
(() => {
|
||||
const form = document.querySelector('[data-be-migrate]');
|
||||
if (!form) return;
|
||||
// The hidden WordPress action input shadows the form.action property.
|
||||
const endpoint = form.getAttribute('action');
|
||||
|
||||
const {__, sprintf} = wp.i18n;
|
||||
const button = form.querySelector('button[type="submit"]');
|
||||
@@ -14,7 +16,7 @@
|
||||
|
||||
async function requestBatch(body) {
|
||||
for (let attempt = 0; ; attempt++) {
|
||||
const response = await fetch(form.action, {
|
||||
const response = await fetch(endpoint, {
|
||||
method: 'POST', body, credentials: 'same-origin', headers: {Accept: 'application/json'},
|
||||
}).catch(() => null);
|
||||
if (response && (attempt === 2 || !retryableStatuses.has(response.status))) return response;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Plugin Name: eventLabs
|
||||
* Plugin URI: https://git.labs.casa/josh/eventLabs
|
||||
* Description: Calendars, recurring events, community submissions, and a Single Event template builder for Elementor.
|
||||
* Version: 0.5.3
|
||||
* Version: 0.5.4
|
||||
* Requires at least: 6.9
|
||||
* Requires PHP: 8.1
|
||||
* Author: hostLabs
|
||||
@@ -16,7 +16,7 @@ declare(strict_types=1);
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
define( 'BURN_EVENTS_FILE', __FILE__ );
|
||||
define( 'BURN_EVENTS_VERSION', '0.5.3' );
|
||||
define( 'BURN_EVENTS_VERSION', '0.5.4' );
|
||||
|
||||
foreach ( [ 'schedule', 'maps', 'events', 'admin', 'map-view', 'calendar-grid', 'calendar', 'community', 'transfer', 'single-event-templates', 'api', 'burnworks', 'clubs', 'legacy-migration', 'updates', 'platform' ] as $module ) {
|
||||
require_once __DIR__ . '/includes/class-' . $module . '.php';
|
||||
|
||||
Reference in New Issue
Block a user