Removing ‘woocommerce-no-js’ class from body
Removing ‘woocommerce-no-js’ class from body
Removing ‘woocommerce-no-js’ class from body
As the WooCommerce Development Team suggest that you don’t remove the product_category base slug completely. Because it stops WordPress from being able to distinguish whether it is a page or product category. Although you can change the Product Category Base Slug: Go to Settings -> Permalinks -> Optional -> Product category base Instead of product-category … Read more
See this post for WooCommerce templating mechanism. One basic principle is: only overwrite things that you want to customize, not more. So you should remove all files that are not changed, look out for double lines of code(meaning you maybe declare the same things twice, maybe with different vars/namespace and/or something else), which might be … Read more
To add another order notes custom fields : add in functions.php : /** * add new order note field */ add_filter( ‘woocommerce_checkout_fields’ , ‘customizing_checkout_fields’, 10, 1 ); function customizing_checkout_fields( $fields ) { // Define new custom Order Notes field data array $customer_note = array( ‘type’ => ‘textarea’, ‘class’ => array(‘form-row-wide’, ‘notes’), ‘label’ => __(‘Order Notes … Read more
You can I think you should use get_terms_args filter instead of get_terms and just add exclude arg, so now get_terms() function won’t retrieve those cats and you’ll get right count. Here’s code example: add_filter( ‘get_terms_args’, ‘mamaduka_edit_get_terms_args’, 10, 2 ); /** * Exclude product categories from Woocommerce * */ function mamaduka_edit_get_terms_args( $args, $taxonomies ) { //print_r($taxonomies); … Read more
Take a look at the body class tags. This will help you further define your CSS selectors to target the elements you want to hide. In this use case, you can a single CSS rule to hide the header on each and every woocommerce page. Here is what I would use in your case .woocommerce … Read more
It was my mistake. I forgot I was using a preload link in the head of the file. In the head of the html I had: <link rel = “preload” href = “../wp-content/themes/themename/locationfolders/font.woff2″ as=”font” type = “font/woff2” crossorigin /> Note the .. at the start of the href what it should be is: <link rel … Read more
You have two options. You can use the hook woocommerce_before_thankyou hook to add some html before “Obrigado. Seu pedido foi recebido” or you can replace the that thankyou text with any html you want with the hook woocommerce_thankyou_order_received_text If you want to use woocommerce_before_thankyou (NOTE: this hook will fire also on failed orders, but you … Read more
I’m going to go with Plan B, as above. The reason being that I don’t want the price being potentially manipulated by using JS in the browser. Also, I have no idea how to set the price with JS from the browser! The plan is have a cron job periodically run a script which loops … Read more
thanks… I dont know if is this good way, but this code in the child theme functions.php is working for me: add_filter(‘woocommerce_product_class’, ‘myFunction’, 10, 4); function myFunction($classname, $product_type, $post_type, $product_id) { $classname=”SUB_WC_Product_my”; return $classname; } class SUB_WC_Product_my extends SUB_WC_Product { public function get_product_price( $context=”view” ) { return “AB”; } }