Avada Forums Community Forum Moving the ‘Add_to-Cart’ button to top of the Product Page

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Gemweo
    Participant
    Post count: 1

    Hi

    First time posting, so hello to everyone.

    I’m not a developer so I don’t fully understand the code on this, but I have been advised the following code either in function.php or in a Code Snippets Plugin (how we have it), should move the Add to Cart button to above the Short Description on the Product Page. But it does not seem to have any affect.

    Can anyone help me with getting this to work?

    add_action( ‘woocommerce_single_product_summary’, ‘customizing_variable_products’, 1 );
    function customizing_variable_products() {

    remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’, 30 );
    add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’, 15 );
    }

    Thanks,
    Gem.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.