WordPress.org

Ready to get started?Download WordPress

Forums

No add to cart button on variable item in woocommerce (1 post)

  1. gcb111
    Member
    Posted 4 months ago #

    Using a premium theme from the MOJO marketplace: TemplateMela Apparel Store for woocommerce.

    I have tried adding the following code to the functions.php file. I first did it in a child theme and that seemed to have no effect. When I added it directly into the theme's original functions file, that caused a php error.

    function mv_my_theme_scripts()
    {
    wp_enqueue_script('add-to-cart-variation', plugins_url() . '/woocommerce/assets/js/frontend/add-to-cart-variation.js',array('jquery'),'1.0',true);
    }
    add_action('wp_enqueue_scripts','mv_my_theme_scripts');
    ?>

Reply

You must log in to post.

About this Topic