WordPress: WooCommerce add to cart button is missing

    This will be a fairly basic tutorial on how to handle a simple problem within the woocomerce system, specifically what to do if the woocomerce add to cart button is missing. This is a fairly common problem, with a variety of causes, that can be fairly irritating to solve. I’ll be running you through a quick selection of diagnoses for the problem, and what you can do to fix them.

    Diagnosis: Theme Issues

    There are some problems with certain woocomerce themes, in particular the Bazar theme is known for causing problems. If you switch to the default theme and the button reappears, then you have a theme issue. This can be resolved by rolling back to an earlier version of the theme, or by switching themes altogether.

    Diagnosis: Code Issues

    There may be some issues with the default options in the coding within WordPress itself. By default, if you have the same price for variations woocomerce hides the price and the add to cart button for simple products. If this is happening to you add this code into the functions php add_filter('woocommerce_show_variation_price’, function() { return TRUE;}); and the problem should be resolved.

    Diagnosis: Missing Information

    The add to cart button will not be added unless a product is fully recognised as a finished and presented product by the site. This means providing all the relevant information. Make sure you have included weight, dimensions, ID, prices and stock keeping unit. Do a quick double check of your product descriptions and make sure everything you needed to provide is there.

    Diagnosis: Extension or Plugin Difficulties

    This is the most common and easiest to test and resolve problem. You may have some plugin, custom CSS or extension that doesn’t’ work well with woocomerce or your theme. All you need to do is turn those off and the problem should vanish quickly.

    Recent Articles

    How to remove category & tag base from WordPress URL

    Would you like to remove the category & tag base from WordPress URL? Do you need custom URL's? It's a super simple!...

    How to Disable Right Click on WordPress

    Are you worried about having your images stolen from your WordPress website? Then you need to know how to disable right click on...

    How to redirect HTTP to HTTPs in .htaccess

    Today's standard is to have an https certificate. Google will love you if your sites are secured. So https is not standard,...

    How to fix TypeError: $ is not a function in WordPress

    We can guess. You purchased a theme or plugin and a console shown a message "TypeError: $ is not a function"? Ok,...

    How to fix Unknown collation: ‘utf8mb4_unicode_520_ci’

    Unknown collation is probably caused because your local and live server are running different versions of MySQL. This problem mostly comes when...

    Related Stories

    Leave A Reply

    Please enter your comment!
    Please enter your name here

    Stay on op - Get the daily news in your inbox