Woo-commerce functionality with variation products

Woo-commerce functionality with variation products
/* Set woo-commerce session */
WC()->session->set( ‘gift_user’, “data” );

/* Get woo-commerce session */
WC()->session->get( ‘gift_user’);

/* Store variation using variation ID */
$variation = array(‘attribute_variation’ => $color);

/* Empty Woo-Commerce cart */

/*Get Woo-commerce price*/
$_product = wc_get_product( $product_id );



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s