title: woocommerce custom code synced force sell based on product quantity
body: <p>I want to force sell based on the product quantity if the customer add 1 product then 2 accessories should be add. if they add more 5, 10 accessories should add.</p>
  <p>My problem is how can I get product ID and assign so that I can assign this custom force sell.</p>
  <pre><code>function my_wc_force_sell_add_to_cart_product( $product) {
      
          $product['quantity'] = 2;
          return $product;
  
  }
  add_filter( 'wc_force_sell_add_to_cart_product', 'my_wc_force_sell_add_to_cart_product');
  
  </code></pre>
  <p>Here's my code to get product ID:</p>
  <pre><code>add_action( 'woocommerce_add_to_cart', 'my_add_force_sell_items_to_cart', 10, 6 );
  
  function my_add_force_sell_items_to_cart( $cart_item_key, $product_id, $quantity, $variation_id, $variation, $cart_item_data ) {
      
      $cart = WC()-&gt;cart-&gt;get_cart();
  
      $product = wc_get_product( $product_id );
      $id = $product-&gt;get_id();
  
      if ( $id == 13 ) {
  
          $params = add_filter( 'wc_force_sell_update_quantity');
          $results = $result = WC()-&gt;cart-&gt;add_to_cart();
          return;
      }
  
      return;
      
      
  }
  
  </code></pre>