title: Change FlexSlider options on mobile in Woocommerce
body: <p>By default on single product page enabled option 'controlNav' = 'thumbnails'. It's ok for desktop. But on mobile i want to be 'controlNav' = true (dots). I tried to do it with ajax, but I think I need somehow refresh that fragment with flex slides to apply filter. I cant get it.</p>
  <p>in JS file:</p>
  <pre><code>if (window.matchMedia('(max-width: 800px)').matches) {
        
          $.ajax({
              url: wc_add_to_cart_params.ajax_url,
              data: { action: 'mobile_slider'},
              type: 'POST'
          })
          .then(res =&gt; console.log('works', res))
      }
  </code></pre>
  <p>in functions.php:</p>
  <pre><code>function hellenik_change_slider_mobile()
  {
      add_filter('woocommerce_single_product_carousel_options', 'hellenik_update_woo_flexslider_options');
  
      function hellenik_update_woo_flexslider_options($options)
      {
  
          $options['smoothHeight'] = true;
          $options['controlNav'] = true;
          $options['animation'] = &quot;slide&quot;;
          $options['slideshow'] = false;
  
  
  
          return $options;
      }
      
      wp_die();
  }
  add_action('wp_ajax_mobile_slider', 'hellenik_change_slider_mobile');
  add_action('wp_ajax_nopriv_mobile_slider', 'hellenik_change_slider_mobile');
  </code></pre>