WooCommerce Quantity in Dropdown menu instead of clasic [closed]

Use this below code for displaying text like “Contact us” below number 6… Please have a look this screenshot http://prntscr.com/mio5ts function woocommerce_quantity_input() { global $product; $defaults = array( ‘input_name’ => ‘quantity’, ‘input_value’ => ‘1’, ‘max_value’ => apply_filters( ‘woocommerce_quantity_input_max’, ”, $product ), ‘min_value’ => apply_filters( ‘woocommerce_quantity_input_min’, ”, $product ), ‘contact’ => apply_filters(‘woocommerce_quantity_input_max’, ‘Contact’), ‘step’ => apply_filters( … Read more

WooCommerce or any other plugin: Deliver JS and CSS through CDN without using a Plugin

WC()->plugin_url() is basically a wrapper for the core function plugins_url(). That functions return value is filtered. return apply_filters( ‘plugins_url’, $url, $path, $plugin ); So you should be able to add a filter to that hook that returns the initial value if $plugin isn’t woocommerce, then checks if the path or URL leads to one of … Read more

Adding a widget under an ‘Add to Cart’ button through a PHP snippet

Your plugin for the converter supports shortcodes, so this is a good starting point. Everything should be as simple as using this code: add_action( ‘woocommerce_after_add_to_cart_button’, ‘astra_add_woocommerce_payments’, 97 ); function astra_add_woocommerce_payments(){ echo do_shortcode( ‘[currency_converter_calculator lg=”en” tz=”0″ fm=”EUR” to=”USD” st=”info” bg=”FFFFFF”][/currency_converter_calculator]’ ); } You probably want to wrap the shortcode result inside a div or something to … Read more

Remove generated category and tag class names from woocommerce product & blog listings markup

You have to leverage the woocommerce wc_product_post_class filter. The following code should do the trick. function my_strip_tag_class( $classes ) { global $post; $product_tags = get_the_terms( $post->ID, ‘product_tag’ ); if( $product_tags ) foreach ( $product_tags as $tag ) { $tag_index = array_search($tag, $classes); if($tag_index !== false){ unset($classes[$tag_index]); } } return $classes; } add_filter( ‘wc_product_post_class’, ‘my_strip_tag_class’ );