Support » Plugin: WooCommerce » Ratings in the single content product

  • 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/

Viewing 1 replies (of 1 total)
  • 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 );
Viewing 1 replies (of 1 total)
  • The topic ‘Ratings in the single content product’ is closed to new replies.