Category: Woocommerce Hooks

  • WooCommerce : How to remove WooCommerce breadcrumbs.

    WooCommerce : How to remove WooCommerce breadcrumbs.

    WooCommerce is one of the most powerful e-commerce plugin for WordPress.And what i love with WooCommerce is that there’s an API for nearly everything.There are almost Hooks and filters For Every Customization work. To remove the woocommerce breadcrumbs we have to remove the hook which is used to add woocommerce breadcrumbs. It’s added by ‘woocommerce_breadcrumb’,which…

  • WooCommerce : How to change the number of products on shop page in woocommerce.

    WooCommerce : How to change the number of products on shop page in woocommerce.

    WooCommerce is one of the most powerful e-commerce plugin for WordPress.And what i love with WooCommerce is that there’s an API for nearly everything.There are almost Hooks and filters For Every Customization work. In order to change the number of products per page on shop page, you have to use ‘loop_shop_per_page’ hook. In our example,…

  • WooCommerce : Change the WooCommerce Breadcrumb Text.

    WooCommerce : Change the WooCommerce Breadcrumb Text.

    WooCommerce is the more powerful e-commerce plugin for WordPress.And what i love with WooCommerce is that there’s an API for nearly everything.There are almost Hooks and filters For Every Customization work. To change the WooCommerce breadcrumb text, you could use the following filter: For example Change “home” to “Products” in WooCommerce breadcrumbs: function woocommerce_change_breadcrumb_text( $bread…

  • Magic of WooCommerce Products Custom Fields

    Magic of WooCommerce Products Custom Fields

    WooCommerce is without any doubt the more powerful e-commerce plugin for WordPress. And what i love with WooCommerce is that there’s an API for nearly everything. Today, i decided to show you how you can customize WooCommerce dynamically, and in particular how to add custom fields to any WooCommerce products. Here is the final result…

  • WooCommerce : Add +(Plus) & -(Minus) Buttons To Quantity Input.

    WooCommerce : Add +(Plus) & -(Minus) Buttons To Quantity Input.

    How can we add +(Plus) & -(Minus) buttons to the quantity input on the product page in WooCommerce? Making a WooCommerce site has only one aim is to impress buyers to get more and more orders. In world of competition we have to look different and unique. To show our site different from other sites…

  • WooCommerce : Custom validation on checkout page for First and Last names to Contain Only Letters.

    WooCommerce : Custom validation on checkout page for First and Last names to Contain Only Letters.

    Customer having name “1234” has placed order on your Woocommerce site? We are in 21st century, but it’s still not possible that a human being having a name like 1234 or any other number. Woocommerce allow to fill user information on it’s checkout page. It also allow create user account at time of checkout. on…

  • WooCommerce : Add same product to cart twice instead of changing quantity in Cart Page.

    WooCommerce : Add same product to cart twice instead of changing quantity in Cart Page.

    How to add the same product twice to cart instead of changing quantity in WooCommerce In normal case when we increase quantity of product in WooCommerce cart it simply increase quantity of same product that’s one product with incremented quantity. But In some of cases, We like to have product in WooCommerce added in the…

  • WooCommerce: Programmatically Remove Product From Cart Using Product Id.

    WooCommerce: Programmatically Remove Product From Cart Using Product Id.

    Want to remove specific WooCommerce product from a cart? WooCommerce provide ‘WC()->cart->remove_cart_item(string $cart_item_key)’ function to remove a product from cart. if we go through WooCommerce Documentation , wewill find that it accepts cart_item_key as parameter. So All we need is to get the cart’s item key and remove accordingly. We Know while adding an item…

  • WooCommerce : Display “FREE” if Product Price is 0 or Empty On WooCommerce Cart Page Or Checkout Page.

    WooCommerce : Display “FREE” if Product Price is 0 or Empty On WooCommerce Cart Page Or Checkout Page.

    Do you ever need to replace the default WooCommerce pricing label for a free product? If we ask any user what will he/she like the text “FREE” or a price tag of “0.00”. Majority will say “Free” Attracts More. Now Let’s talk about WooCommerce ,In WooCommerce when product price is zero or empty then on…