Plugin Directory

Changeset 3402055


Ignore:
Timestamp:
11/24/2025 07:22:57 PM (3 months ago)
Author:
allaccessible
Message:

2.0.2 bug fixes

Location:
allaccessible/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • allaccessible/trunk/README.txt

    r3401054 r3402055  
    66Requires at least: 5.0
    77Tested up to: 6.8.2
    8 Stable tag: 2.0.1
     8Stable tag: 2.0.2
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    167167
    168168== Changelog ==
     169
     170= 2.0.2 =
     171* Bug Fixes
    169172
    170173= 2.0.1 =
  • allaccessible/trunk/inc/WidgetCustomizer.php

    r3401054 r3402055  
    2424        return;
    2525    }
     26
     27    // Get correct subdomain ID from validate response
     28    $subdomain_id = $site_options->subID ?? get_option('aacb_siteID');
    2629
    2730    // Extract current values
     
    97100                <form id="aacb-widget-settings-form">
    98101                    <input type="hidden" name="accountID" value="<?php echo esc_attr(get_option('aacb_accountID')); ?>">
    99                     <input type="hidden" name="siteID" value="<?php echo esc_attr(get_option('aacb_siteID')); ?>">
     102                    <input type="hidden" name="subdomainID" value="<?php echo esc_attr($subdomain_id); ?>">
    100103
    101104                    <div class="aacx-space-y-8">
     
    428431            e.preventDefault();
    429432
     433            const subdomainID = $('input[name="subdomainID"]').val();
     434
     435            if (!subdomainID) {
     436                console.error('❌ Cannot save - no subdomain ID found');
     437                $('#save-status').addClass('aacx-hidden');
     438                $('#save-error').removeClass('aacx-hidden').text('Error: Missing subdomain ID. Please refresh and try again.');
     439                $('#save-widget-settings').prop('disabled', false);
     440                return;
     441            }
     442
    430443            const formData = {
    431444                accountID: $('input[name="accountID"]').val(),
    432                 siteID: $('input[name="siteID"]').val(),
     445                subdomainID: subdomainID,
    433446                triggerBtnBg: $('input[name="triggerBtnBg"]').val(),
    434447                buttonPosition: $('select[name="buttonPosition"]').val(),
     
    446459            $('#save-error').addClass('aacx-hidden');
    447460
    448             // Call save-site-options API
     461            // Call save-site-options API with subdomain ID
    449462            $.ajax({
    450                 url: 'https://api.allaccessible.org/save-site-options',
     463                url: 'https://api.allaccessible.org/save-site-options/' + subdomainID,
    451464                method: 'POST',
    452465                contentType: 'application/json',
Note: See TracChangeset for help on using the changeset viewer.