title: retrieving value from add_action in wordpress
body: <p>I am trying to call an action inside the filter. I want to retrieve a value from the action method and use it for the filter function</p>
  
  <pre><code>   add_filter( 'wc_product_table_query_args', 'wcpt_custom_query_args', 10, 3 );
  
  function wcpt_custom_query_args( $args, $product_table) {
  add_action('dokan_store_profile_frame_after', 'add_store_id', 13, 2);
          ;
  
      // do something with $args
  $args += array('author' =&gt; $store_id);
  
      return $args;
  }
  
  function add_store_id($store_user, $store_info){
      $store_id = $store_user-&gt;ID;    
      return $store_id;
  
  }
  </code></pre>
  
  <p>How can I retrieve the $store_id inside the function wcpt_custom_query_args?</p>