skip to Main Content

Woocommerce variation dropdown option tag add some dataset

<select class="license_type" name="license_type" id="license_type"> <option value="license" data-set="500">Single Site License</option> <option value="license" data-set="700">5 Site License</option> <option value="license" data-set="1400">Developers License</option> </select> In the woocommerce variation product - I want to add some data-set tags in option tag. data-set="<? php some code here…

VIEW QUESTION

Woocommerce – If variation product then execute condition else if simple then execute other condition

function wooprice(){ global $product; // 1 Get product varations $product_variations = $product->get_available_variations(); // 2 Get one variation id of a product $variation_product_id = $product_variations [0]['variation_id']; // 3 Create the product object $variation_product = new WC_Product_Variation( $variation_product_id ); if ($product->is_type( 'variable'…

VIEW QUESTION
Back To Top
Search