title: Wordpress replace plugin function with own one
body: <p>I use woocommerce plugin in my WordPress site. In the plugin there is function  widget(), I want to call  my own function, so when site loads, instead of plugin function</p>
  
  <pre><code>public function widget($args, $instance)
  </code></pre>
  
  <p>my function will be called. </p>
  
  <p>I think it should be done with add_filter, by I can't find out how.</p>
  
  <p>Plugin file directory is:</p>
  
  <pre><code>woocommerce/includes/widgets/class-wc-widget-layered-nav.php
  </code></pre>