How to add another ordercomments field to woocommerce checkout

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

Warning: Attempt to read property “term_id” on int – Woocommerce

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

WooCommerce: I Need to hide my page title/header (including menu) from all the WooCommerce related product pages, such as category and keyword pages

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

How to add a text in the checkout page woocomerce?

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

Override the plugin class and function

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”; } }