Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Obtain coupon info › Reply To: Obtain coupon info
November 1, 2016 at 11:54 pm
#749
Soft79
Keymaster
The free gift is saved in the session. You can read the currently selected free item using:
WJECF_API()->get_session_selected_product( $coupon_code )
Setting the free item is not yet in the API of the plugin, but you can use the following method:
WJECF()->get_plugin('WJECF_Pro_Free_Products')->set_session_selected_product( $coupon_code, $product_id )