wooCommerce checkout page State / County (optional) validate not working

Code goes in function.php file of your active child theme (or active theme). It could works. add_filter( ‘woocommerce_billing_fields’, ‘woo_filter_state_billing’, 10, 1 ); function woo_filter_state_billing( $address_fields ) { $address_fields[‘billing_state’][‘required’] = true; return $address_fields; } add_filter( ‘woocommerce_shipping_fields’, ‘woo_filter_state_shipping’, 10, 1 ); function woo_filter_state_shipping( $address_fields ) { $address_fields[‘shipping_state’][‘required’] = true; return $address_fields; }

Add Product Subtitle to Woocommerce Product Page

This is what I have used to show the product category as a subtitle on my shop archive page add_action( ‘woocommerce_shop_loop_item_title’, ‘woocommerce_shop_loop_item_subtitle’, 20 ); function woocommerce_shop_loop_item_subtitle() { global $post, $product; $categ = $product->get_categories(); echo $categ; } and this is what I used to display it on the single product page add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_single_item_subtitle’, 5 ); … Read more

Woocommerce plugin for minimum order and add-to-card-step

I think YITH Woocommerce Minimum Maximum Quantity plugin is the best solution for your purpose. It enables you to set a minimum or maximum quantity for product selection. It also shows quantity/amount error messages to your customers. Moreover, you can use the plugin to set a different minimum quantity for each of the product. So, … Read more

Fatal error: Call to undefined method WooCommerce::nonce_field()

The Products section in wp-admin panel doesn’t depend on the theme. If you select default WordPress theme you’ll see the same issue. This is WordPress configuration. To fix the errors you need edit files via FTP, open the file wp-content/themes/your_theme/woocommerce/cart/shipping-calculator.php on line 67 and replace $woocommerce->nonce_field with wp_nonce_field and the file wp-content/themes/your_theme/woocommerce/checkout/form-checkout.php on line 3 … Read more