Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Contribute to GitLab
  • Sign in
W
woocommerce_bpd
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 8
    • Issues 8
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • wordpress
  • woocommerce_bpd
  • Issues
  • #1

Closed
Open
Opened Sep 21, 2014 by Stefy Lanza (nextime / spora )@nextime
  • Report abuse
  • New issue
Report abuse New issue

Add product with an product addon programatically

Created by: johncarter-

Hi

First, thanks for putting this up, this is a great plugin and your modifications have made it nearly perfect for my use.

I have one question, how would I go about using this plugin to add a product to cart programtically? Is it even possible? I know that Woocommerce has the ability to add products like so:

public function add_to_cart( $product_id, $quantity, $variation_id = '', $variation = '', $cart_item_data = array() ) {

How would the product add ons be parsed in this function?

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
0
Labels
None
Assign labels
  • View project labels
Reference: wordpress/woocommerce_bpd#1