• Hello,

    I tried the plugin and it seems to work great except that I am using polylang and I didn’t find any way to translate the settings in order to have different messages between languages so I had to drop the plugin.

    It would be great if support for polylang would be added to this plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter stargayte

    (@stargayte)

    It took me a while, but I finally found the bug in the plugin.

    It seems that WPFront Notification Bar is using the function get_option too early, it should wait for the plugins to be loaded before executing this function. The documentation explaining this here:
    https://polylang.pro/dont-take-any-action-before-plugins_loaded-is-fired/

    So I changed the wpfront-notification-bar.php file with :

    if(class_exists('\WPFront\Notification_Bar\WPFront_Notification_Bar') || class_exists('WPFront_Notification_Bar')) {
        return;
    }
    
    use WPFront\Notification_Bar\WPFront_Notification_Bar;
    
    function wpfront_notification_bar_init() {
      require_once("classes/class-wpfront-notification-bar.php");
    
      WPFront_Notification_Bar::Instance()->init(plugin_basename(__FILE__));
    }
    
    add_action('plugins_loaded', 'wpfront_notification_bar_init');
    

    And the translation is working like a charm now.
    It would be great to fix this, the fix is pretty easy just wrapping the execution of the plugin with the hook “plugins_loaded”.

    Plugin Support Swathi S

    (@swathiswpfront)

    Hello @stargayte,

    Thanks for your suggestion. Will check it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Polylang support’ is closed to new replies.