Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Product Open Pricing (Name Your Price) for WooCommerce - Add to cart programmatically
if( is_admin() ){
$product_id = 161;
$quantity = 1;
$variation_id = 0;
WC()->cart->add_to_cart( $product_id, $quantity, $variation_id, array(), array(
'alg_open_price' => 99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.