title: global variables in wordpress or woocommerce
body: <pre><code>public function action_save_post($post_id) {
      global $wpdb;       
  
          $wooqty = $_POST['qty'];
          if( !empty( $wooqty ) )
          update_post_meta( $post_id, 'qty', esc_attr( $wooqty ) );
  
          } 
  </code></pre>
  
  <p>This will save the data from a Form field in Metabox in wordpess. I would like to use this variable $wooqty which has a value to another function. </p>
  
  <pre><code>public function action_woocommerce_add_order_item_meta($item_id, $values) {
      global $wpdb;
  
  
  
      $product_no = (int) $values['product_id'];
      $qty_no = (int) $values['quantity'];
  }
  </code></pre>
  
  <p>I would like to replace the variable $qty_no data to the $wooqty. my problem is how do i pass the variable <code>$wooqty</code> to this function so that i can replace the values of <code>$qty_no</code>.</p>