PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Settings are not saved

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi,

 

I'm trying to save an option as ON in"advanced" tab (Individual fixed prices rules for each product(*)), but when I save settings, it reverts back to OFF.

I cleared the cache plugin and"Is multiple allowed" is"yes".

 

What can I do?

Thanks

Hello

Try in file - wp-content\plugins\woocommerce-currency-switcher\classes\statistic.php change function __construct()
New function:
public function __construct() {

if (!$this->can_collect()) {
return;
}

//***

global $wpdb;
$this->table = $wpdb->prefix . $this->table;

add_action('admin_print_scripts', function() {
if (isset($_GET['page']) AND isset($_GET['tab'])) {
if ($_GET['page'] == 'wc-settings' AND $_GET['tab'] == 'woocs') {
wp_dequeue_script('iris');
wp_enqueue_script('woocs-stat-google-chart-lib', WOOCS_LINK . 'js/chart.min.js', array('jquery'), WOOCS_VERSION);
wp_enqueue_script('woocs-stat-google-charts', WOOCS_LINK . 'js/statistic.js', array('woocs-stat-google-chart-lib'), WOOCS_VERSION);
}
}
}, 9);

add_action('admin_head', function() {
if (isset($_GET['page']) AND isset($_GET['tab'])) {
if ($_GET['page'] == 'wc-settings' AND $_GET['tab'] == 'woocs') {

wp_enqueue_script('jquery');
wp_enqueue_script('jquery-ui-datepicker', array('jquery'), WOOCS_VERSION);

wp_enqueue_style('jquery-ui-190', WOOCS_LINK . 'css/jquery-ui.css', false,"1.9.0", false);

//***

wp_dequeue_script('iris'); //as it in conflict with chart.min.js

}
}
}, 999);

//***

add_action('wp_ajax_woocs_stat_redraw', function() {
$scenario = intval($_REQUEST['scenario']);
$tmp = $this->get(sanitize_key($_REQUEST['type']), $scenario, intval($_REQUEST['time_from']), intval($_REQUEST['time_to']));

//***

$res = [
'stat_label' => $this->get_label($scenario),
'stat_labels' => array_keys($tmp),
'stat_data' => array_values($tmp)
];

die(json_encode($res));
});
}