update_post_meta performance in a loop woocommerce
I think, an idea would be to save your values on a new small table with all you need, and have a script that once every “n” hours update all metas.
I think, an idea would be to save your values on a new small table with all you need, and have a script that once every “n” hours update all metas.
I think, an idea would be to save your values on a new small table with all you need, and have a script that once every “n” hours update all metas.
Found a quick solution for this problem. Unable to remove action as Sally mentioned above with example.For me the display:none; is enough, i have remove the child div of summary class. See the code below: .summary.entry-summary div:nth-child(5) { display: none; } For me its 5th child maybe it will help others.
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
First you should check if you’re actually replacing Read more, you can also remove the default: and just make sure you return the original value passed to the filter. If you specifically want to use switch you can use a less commonly used pattern for evaluating statements by setting switch(true) and then enclosing the if … Read more
Trying to figure out why an error is returned when trying to add an item to the basket on this website
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
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
French accented text replaced with ? in woocommerce product list
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’ );