Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1350830

    Hi there

    I’ve been trying to reorder the single product page in Woocommerce but it appears that Enfold is stopping changes made to webhooks.

    Can someone take a look?

    These are the hooks that need changing:

    remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_rating’, 10);
    add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_rating’ , 40);

    remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 10);
    add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 40);

    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’, 50);

    remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_meta’, 40);
    add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_meta’, 30);

    #1350983

    Hey Silvio,

    Thank you for the inquiry.

    Where are you testing this modification? Please provide the site URL in the private field so that we can check the changes.

    You may need to wrap the hooks inside the woocommerce_before_single_product hook to override the modifications made by the theme.

    add_action('woocommerce_before_single_product', 'avia_woocommerce_new_hooks_mod');
    function avia_woocommerce_new_hooks_mod() {
    	// your hooks here
    }
    
    

    You can find the plugin configuration in the enfold > config-woocommerce > config.php file.

    Best regards,
    Ismael

    #1351037
    This reply has been marked as private.
    #1351098

    Hi,

    Thank you for the update.

    You can move your own custom hooks inside the avia_woocommerce_new_hooks_mod function that we provided above. Place the code in the functions.php file. This should override the default template hooks in the theme.

    Best regards,
    Ismael

    #1351142

    Thanks, this doesn’t do anything…

    #1351803

    Hi,
    Thank you for your patience, to move the price and add to cart button below the tabs on a single product page I tested this function on my demo site:

    add_action('woocommerce_before_single_product', 'avia_woocommerce_new_hooks_mod');
    function avia_woocommerce_new_hooks_mod() {
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);
    add_action( 'woocommerce_after_single_product_summary', 'woocommerce_template_single_price', 2);
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30);
    add_action( 'woocommerce_after_single_product_summary', 'woocommerce_template_single_add_to_cart', 3);	
    }

    this was the result:
    2022-05-14_150312.jpg
    I believe this is what you were asking for, I also tested this on your single product page with similar results, please see the screenshot in the Private Content area.
    I didn’t leave this function in your child theme functions.php, so please add it and check.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.