Plugin Directory

Changeset 2916319


Ignore:
Timestamp:
05/23/2023 11:17:54 AM (3 years ago)
Author:
wpoperations
Message:

Fixed custom product saving issue

Location:
salert
Files:
40 added
4 edited

Legend:

Unmodified
Added
Removed
  • salert/trunk/assets/backend/js/custom.js

    r2909012 r2916319  
    88        $('.save-notice').slideDown();
    99    });
    10 
     10console.log(admin_settings.ajax_nonce);
    1111    // Saving Data With Ajax Request
    1212    $('form#salert-settings-form').on('submit', function(e) {
  • salert/trunk/inc/settings.php

    r2909012 r2916319  
    620620                            <div><?php echo esc_html__('Our support team is always waiting for your questings.','salert');?></div>
    621621                            <br>
    622                             <a href="https://wpoperation.com/support" target="_blank" class="button button-secondary"><?php echo esc_html__('Create Ticket','salert');?></a>
     622                            <a href="https://wpoperation.com/contact" target="_blank" class="button button-secondary"><?php echo esc_html__('Create Ticket','salert');?></a>
    623623                        </div>
    624624                    </div>
     
    660660    }
    661661
     662        /**
     663         * @since 1.2.3
     664         * Sanitize array or string
     665         * 
     666         * */   
     667        public function sanitize_form_setting_array($input){
     668
     669            if( is_string($input) ){
     670                $input = sanitize_text_field($input);
     671            }elseif( is_array($input) ){
     672                foreach ( $input as $key => $value ) {
     673                    if ( is_array($value) ) {
     674                        $value = self::sanitize_form_setting_array($value);
     675                    }
     676                    else {
     677                        $value = sanitize_text_field($value);
     678                    }
     679                }
     680            }
     681            return $input;
     682        }
     683
    662684    public function salert_save_settings_with_ajax(){
    663685        if( isset( $_POST['fields'] ) ) {
     
    691713            'popup-timeperiod'          => sanitize_text_field($settings['popup-timeperiod']),
    692714            'popup-timeago'             => sanitize_text_field($settings['popup-timeago']),
    693             'popup-products'            => sanitize_text_field($settings['popup-products']),
     715            'popup-products'            => self::sanitize_form_setting_array($settings['popup-products']),
    694716            'product-count'             => sanitize_text_field($settings['product-count']),
    695717            'popup-contents'            => sanitize_text_field($settings['popup-contents']),
  • salert/trunk/readme.txt

    r2909012 r2916319  
    33License: GPLv2 or later
    44License URI: http://www.gnu.org/licenses/gpl-2.0.html
    5 Tested up to: 6.2
     5Tested up to: 6.2.2
    66Tags: woocommerce, notification, fake notification, sales notification
    7 Stable tag: 1.2.2
     7Stable tag: 1.2.3
    88
    99
     
    3838
    3939== Changelog ==
     40
     41= 1.2.3 =
     42- Fixed custom product saving issue
    4043
    4144= 1.2.2 =
  • salert/trunk/salert.php

    r2909012 r2916319  
    55  Plugin URI:  https://wpoperation.com/plugins/salert/
    66  Description: The plugin will generate fake sales notifications, which will help to boost your sales.Also works without WooCommerce Plugin.
    7   Version:     1.2.2
     7  Version:     1.2.3
    88  Author:      WPoperation
    99  Author URI:  https://wpoperation.com/
     
    2020defined('SALERT_PATH') or define('SALERT_PATH',plugin_dir_path(__FILE__));
    2121defined('SALERT_DIR') or define('SALERT_DIR',plugin_dir_url(__FILE__));
    22 defined('SALERT_VERSION') or define('SALERT_VERSION','1.2.2');
     22defined('SALERT_VERSION') or define('SALERT_VERSION','1.2.3');
    2323/*
    2424**Require File Directories
Note: See TracChangeset for help on using the changeset viewer.