/** * Remove the variant options from the page. * * @since 1.0 */ public function remove_variant_options() { $product = \ITELIC\get_current_product_id(); $session = $this->get_cache_data(); if (!isset($session["p" . $product]) || $session["p" . $product] === null) { return; } add_filter('it_exchange_multi_item_product_allowed', function ($allowed, $product_id) use($product) { if ($product_id == $product) { $allowed = false; } return $allowed; }, 10, 2); wp_dequeue_script('it-exchange-variants-addon-frontend-product'); wp_dequeue_style('it-exchange-variants-addon-frontend-product'); remove_filter('wp_footer', 'it_exchange_variants_addon_print_product_variant_js'); remove_filter('it_exchange_get_content_product_product_info_loop_elements', 'it_exchange_variants_addon_register_template_loop'); }
<?php echo $key->get_key(); ?> </option> <?php } ?> <?php } ?> </select> <input type="hidden" name="itelic_nonce" value="<?php echo wp_create_nonce('itelic_renew_product_sw'); ?> "> <input type="hidden" name="itelic_product" value="<?php echo esc_attr(\ITELIC\get_current_product_id()); ?> "> <input type="submit" class="itelic-submit" name="itelic_purchase_another" value="<?php esc_attr_e("Purchase Another", ITELIC\Plugin::SLUG); ?> "> <input type="submit" class="itelic-submit" name="itelic_renew" value="<?php esc_attr_e("Renew", ITELIC\Plugin::SLUG); ?> "> </div> </form> </div>