Remove Span Class From Woocommerce Price

You can use “woocommerce_get_price_html” filter to remove class from span tag like: add_filter( ‘woocommerce_get_price_html’, ‘remove_class_price_html’, 10, 2 ); function remove_class_price_html( $price, $product ) { return str_replace( ‘woocommerce-Price-currencySymbol’, ”, $price ); } Or else you can use preg_replace to remove class from both span tags.

ACF | WooCommerce | Theme Development | How to include a /template-part/ that makes use of ACF’s on a custom WooCommerce homepage?

You cannot include template files via URL, which is what get_template_directory_uri() returns. You need to use the server file path, which you get get with get_theme_file_path(): $heroslider = get_theme_file_path( ‘template-parts/hero-slider.php’ ); echo $heroslider; include_once( $heroslider ); However, if you’re including templates (rather than files with function/class definitions), you should use get_template_part() to get the correct … Read more

Adding arguments to WooCommerce Product Loop using AJAX

Figured this out now. Instead of using $wp_query->set(), I instead set arguments, and then ran the woocommerce loop. This is the final code I used. add_action(‘wp_ajax_listFilteredProducts’, ‘listFilteredProducts’); add_action(‘wp_ajax_nopriv_listFilteredProducts’, ‘listFilteredProducts’); function listFilteredProducts($wp_query) { if(isset($_GET[‘formData’])) { $value = $_GET[‘formData’]; } // If no price input, but tags have been input if ($value[‘priceRange’] == 0 && $value[‘tags’] != … Read more

How keep woocommerce users separeted in multisite install and keep admins on network

I don’t know if is the best way to do this but aparently works well. I override the users table adding one with an blog_id field as key. Add an “wp_pre_insert_user_data” filter to set the blog_id field and change the user id to some like “blog_id000user_id” (100044 for example is from blog 1). Override the … Read more