WordPress.org

Forums

WooCommerce - excelling eCommerce
Ratings in the single content product (2 posts)

  1. whoaloic
    Member
    Posted 1 year ago #

    Hello!
    In the content single product template, there is rating between title and price. But In the content-single-product.php file, there is that action :

    /**
    			 * woocommerce_single_product_summary hook
    			 *
    			 * @hooked woocommerce_template_single_title - 5
    			 * @hooked woocommerce_template_single_price - 10
    			 * @hooked woocommerce_template_single_excerpt - 20
    			 * @hooked woocommerce_template_single_add_to_cart - 30
    			 * @hooked woocommerce_template_single_meta - 40
    			 * @hooked woocommerce_template_single_sharing - 50
    			 */
    			do_action( 'woocommerce_single_product_summary' )

    There is no hook related to ratings.

    I would like to place the ratings below the price like I did in the shop page by usins that function:

    remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
    remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
    
    add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 11 );
    add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 12 );

    Any idea?
    Regards.

    https://wordpress.org/plugins/woocommerce/

  2. whoaloic
    Member
    Posted 1 year ago #

    OK here's the solution!

    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );
    add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 11 );

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

Tags

No tags yet.