Plugin Directory

Changeset 3264537


Ignore:
Timestamp:
03/31/2025 03:03:16 PM (10 months ago)
Author:
techdogsoftware
Message:

New version 1.4.2! Check the changelog for more information.

Location:
softwear-for-woocommerce/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • softwear-for-woocommerce/trunk/readme.txt

    r3263534 r3264537  
    55Tested up to: 6.7
    66Requires PHP: 7.4
    7 Stable tag: 1.4.1
    8 Version: 1.4.1
     7Stable tag: 1.4.2
     8Version: 1.4.2
    99License: GNU General Public License v2.0
    1010License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     
    113113== Changelog ==
    114114
     115= 1.4.2 31-03-2025 =
     116
     117* Add – Introduced a new setting under "Other Settings" that allows users to enable or disable automatic synchronization.
     118
    115119= 1.4.1 28-03-2025 =
    116120
  • softwear-for-woocommerce/trunk/softwear-for-woocommerce.php

    r3263534 r3264537  
    1616 * Plugin Name: Softwear for WooCommerce
    1717 * Description: Connecting Softwear to sync all your products, orders and payments.
    18  * Version: 1.4.1
     18 * Version: 1.4.2
    1919 * Requires at least: 6.3
    2020 * Requires PHP: 7.4
  • softwear-for-woocommerce/trunk/src/pages/settings-page.php

    r3247020 r3264537  
    163163    echo '<p class="softwearwc-additional-description">
    164164            Kies of producten met meerdere kleuren moeten worden gesplitst in afzonderlijke producten, of dat ze als één product moeten worden geïmporteerd.
     165          </p>';
     166}
     167
     168function softwearwc_field_auto_sync() {
     169    // Fetch the current settings array from the database
     170    $settings = get_option('softwearwc_settings_other', []);
     171   
     172    // Get the specific value for 'auto_sync'
     173    $selected_value = isset($settings['auto_sync']) ? $settings['auto_sync'] : 'false';
     174
     175    // Define the dropdown options
     176    $options = [
     177        '' => 'Selecteer een optie',
     178        'true' => 'Automatisch alles synchroniseren',
     179        'false' => 'Geen automatische synchronisatie',
     180    ];
     181
     182    // Render the dropdown
     183    echo '<select id="softwearwc_auto_sync" name="softwearwc_settings_other[auto_sync]">';
     184    foreach ($options as $value => $label) {
     185        echo '<option value="' . esc_attr($value) . '"' . ($value === '' ? ' hidden' : '') . selected($selected_value, $value, false) . '>' . esc_html($label) . '</option>';
     186    }
     187    echo '</select>';
     188
     189    // Additional description
     190    echo '<p class="softwearwc-additional-description">
     191            Kies of alles automatisch moet worden gesynchroniseerd met Softwear, of dat je handmatig wilt synchroniseren. Er word elke 24 uur automatisch gesynchroniseerd.
    165192          </p>';
    166193}
  • softwear-for-woocommerce/trunk/src/settings/initialize-settings.php

    r3247020 r3264537  
    133133        'softwearwc_section_other'
    134134    );
     135
     136    add_settings_field(
     137        'softwearwc_field_auto_sync',
     138        'Automatic syncronization',
     139        'softwearwc_field_auto_sync',
     140        'softwearwc-settings-other',
     141        'softwearwc_section_other'
     142    );
    135143}
    136144
     
    185193    softwearwc_validate_option($input, $options, $output, 'image_deletion');
    186194    softwearwc_validate_option($input, $options, $output, 'product_color_split');
     195    softwearwc_validate_option($input, $options, $output, 'auto_sync');
    187196
    188197    if ($options == $output) {
  • softwear-for-woocommerce/trunk/src/webhooks/settings-webhook.php

    r3247020 r3264537  
    9797            'image_check' => $value['image_check'] ?? '',
    9898            'product_color_split' => $value['product_color_split'] ?? '',
     99            'auto_sync' => $value['auto_sync'] ?? '',
    99100        ]
    100101    ]);
Note: See TracChangeset for help on using the changeset viewer.