WooCommerce - excelling eCommerce
woocommerce add-to-cart buttons not appearing (1 post)

  1. elliot.b
    Posted 2 years ago #


    check out this page, the add-to-cart button is supposed to appear once some product options are selected, instead all I get is this JS error from my web inspector console:
    Uncaught TypeError: Cannot read property '154' of undefined,

    Searching around, this seems to be a pretty common issue with many different solutions/causes.

    I have narrowed it down to a problem with this site's theme, as the add-to-cart buttons in twenty-ten, and other default themes, turning off plugins doesn't help either.

    I do not usually work with WordPress, and I did not write the theme, can someone help me understand how this "hooks" business works in woothemes?

    Here's my content-single-product.php, the code has what looks like the atc button's functions commented and "hooked"

    * @hooked woocommerce_template_single_add_to_cart - 30,

    Do I have to make a change to the following code in woocommerce-hooks.php?

    	 * Product Add to cart
    	 * @see woocommerce_template_single_add_to_cart()
    	 * @see woocommerce_simple_add_to_cart()
    	 * @see woocommerce_grouped_add_to_cart()
    	 * @see woocommerce_variable_add_to_cart()
    	 * @see woocommerce_external_add_to_cart()
    	add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
    	add_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );
    	add_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 );
    	add_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 );
    	add_action( 'woocommerce_external_add_to_cart', 'woocommerce_external_add_to_cart', 30 );

    or is the a problem with add-to-cart-variation.min.js?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic