context(); if ( is_wp_error( $state ) || array_diff( explode( ' ', ConnectionManager::BOOKING_SCOPE ), explode( ' ', $state['scope'] ?? '' ) ) ) { return ''; } $binding = array( 'kind' => 'embed', 'account' => $state['account_id'], 'connection' => $state['connection_id'], 'service' => $service['id'], 'selector' => $attributes['resourceSelector'] ?? 'optional', 'locale' => $attributes['locale'], 'expires' => time() + DAY_IN_SECONDS, ); wp_enqueue_script( 'waitlistize-booking' ); wp_enqueue_style( 'waitlistize-booking' ); return '