override the default WooCommerce products search form

Exists the template product-searchform.php, you have to override it in your theme. More information here about how to override WooCommerce templates from your theme. Basically the WooCommerce search forms returns only products and not also other post types because the product post type is specified in an hidden input: <input type=”hidden” name=”post_type” value=”product” />

how to change the “return to shop” button text? [closed]

If you browse the source code of the plugin, you’ll see “return to shop” is used three times in: includes/class-we-checkout.php:956 includes/class-wc-ajax.php:257 templates/car/cart-empty.php:33 for the first two, the classes – there’s no hooks or filters to change that text. There’s no function that conjurors that text either. It is, as it is. However, you can do … Read more

Woocomnerce Limit Purchase value before proceed checkout

Put this code in your current theme function.php file. METHOD 1: add_action( ‘woocommerce_check_cart_items’, ‘spyr_set_weight_requirements’ ); function spyr_set_weight_requirements() { if( is_cart() || is_checkout() ) { global $woocommerce; $total = WC()->cart->total; if( $total < 15 ){ wc_add_notice( ‘<strong>MAXIMUM CART PRICE 15 FOR CHECKOUT</strong>’,’error’); } } } METHOD:2 function disable_checkout_button_no_shipping() { $total = WC()->cart->total; if( $total < 15 … Read more

Woocommerce – WordPress Roles & Capabilities

Using the Access plugin, you can create more fined grained access control and achieve better administration of your site. Use the following steps to create your own roles with custom permissions for Woo-commerce. 1. Create a custom role. 2. Click on Change permissions for that role, click on Woo-commerce capabilities to display related ones and … Read more

Change Firstname & Lastname order in the order-processing e-mail templates

I figured out a workaround solution and it works, but not the most beautiful: // I made the original action passive // do_action( ‘woocommerce_email_customer_details’, $order, $sent_to_admin, $plain_text, $email ); // … create a new solution from scratch $text_align = is_rtl() ? ‘right’ : ‘left’; //to escape # from order id $order_id = trim(str_replace(‘#’, ”, $order->get_order_number())); … Read more

Include js script ONLY on woocommerce product category pages? [closed]

Use wp_unqueue_script for including scripts. Last parametr true include this script in footer. And woocommerce has condotions functions. You need is_product_category() or WordPress default condition is_tax(‘product_cat’). This code should work for you: function read_more_js() { if ( is_product_category() ) { wp_enqueue_script( ‘load-more-js’, esc_url( get_template_directory_uri() ) . ‘/js/read-more.js’, array( ‘jquery’ ), null, true ); } } … Read more