
smart-contech(@smart-contech)
2 Posts
Customers
Quote from smart-contech on August 19, 2020, 01:12
WOOCS - WooCommerce Currency Switcher - WooCommerce Multi Currency and WooCommerce Multi Pay Version 2.3.1
WordPress 5.5 & and WooCommerce 4.4.0 sends the next error:
Notice: register_rest_route was called incorrectly. The REST API route definition for woocs/v3/currency is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /var/www/wp-includes/functions.php on line 5225
We will appreciate if you could fix it in the next version.
WOOCS - WooCommerce Currency Switcher - WooCommerce Multi Currency and WooCommerce Multi Pay Version 2.3.1
WordPress 5.5 & and WooCommerce 4.4.0 sends the next error:
Notice: register_rest_route was called incorrectly. The REST API route definition for woocs/v3/currency is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /var/www/wp-includes/functions.php on line 5225
We will appreciate if you could fix it in the next version.

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on August 19, 2020, 11:29
Hello
Yes, we know that. Now we are preparing a new version of the plugin with a fix.
this does not affect the functionality of the plugin
If you want to fix it. in file - wp-content\plugins\woocommerce-currency-switcher\classes\woocs_after_33.php add this code -
https://c2n.me/48LXbF5.png add_action('rest_api_init', function () {
register_rest_route('woocs/v3', '/currency', array(
'methods' => 'GET',
'callback' => function() {
global $WOOCS;
return $WOOCS->get_currencies();
},
'permission_callback' => function(){
return true;
},
));
});
Hello
Yes, we know that. Now we are preparing a new version of the plugin with a fix.
this does not affect the functionality of the plugin
If you want to fix it. in file - wp-content\plugins\woocommerce-currency-switcher\classes\woocs_after_33.php add this code -
https://c2n.me/48LXbF5.png add_action('rest_api_init', function () {
register_rest_route('woocs/v3', '/currency', array(
'methods' => 'GET',
'callback' => function() {
global $WOOCS;
return $WOOCS->get_currencies();
},
'permission_callback' => function(){
return true;
},
));
});