Your account expired support, please renew to get your support.

Home Forums Themes Support Claue Woocommerce Hooks Ordering

Viewing 7 reply threads
  • Author
    Posts
    • #42730
      jascom
      Support Expired

      Is it possible to change the order in which the Woocommerce Product Details display on the Claue Theme.  At the moment it is as per below and I want to move the Size Attribute to the top of the page above the title.

      Title

      Price

      Description

      Size (attribute)

    • #42732
      Harry
      Support Expired

      Hi Jascom,

      Thank you for choose our theme and contact us.

      Please add below code to claue-child > functions.php

      remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
      remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );
      remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
      remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
      
      add_action( 'woocommerce_single_variation','woocommerce_template_single_title', 5 );
      add_action( 'woocommerce_single_variation','woocommerce_template_single_rating', 10 );
      add_action( 'woocommerce_single_variation','woocommerce_template_single_price', 10 );
      add_action( 'woocommerce_single_variation','woocommerce_template_single_excerpt', 15 );

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #42733
      jascom
      Support Expired
      This reply has been marked as private.
    • #42738
      jascom
      Support Expired
      This reply has been marked as private.
    • #42739
      Harry
      Support Expired

      Hi,

      Please change code to

      remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
      remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );
      remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
      remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
      
      add_action( 'woocommerce_single_variation','woocommerce_template_single_title', 5 );
      add_action( 'woocommerce_single_variation','woocommerce_template_single_rating', 10 );
      add_action( 'woocommerce_single_variation','woocommerce_template_single_price', 20 );
      add_action( 'woocommerce_single_variation','woocommerce_template_single_excerpt', 15 );

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #42789
      jascom
      Support Expired
      This reply has been marked as private.
    • #42794
      Harry
      Support Expired

      Hi,

      Please change code to

      add_action( 'woocommerce_single_product_summary', 'custom_single_product_styles', 2 );
      function custom_single_product_styles() {
          global $product;
      	// Only for variable products
          if ( ! $product->is_type('variable') ) return;
          remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
      	remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );
      	remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
      	remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
      
      	add_action( 'woocommerce_single_variation','woocommerce_template_single_title', 5 );
      	add_action( 'woocommerce_single_variation','woocommerce_template_single_rating', 10 );
      	add_action( 'woocommerce_single_variation','woocommerce_template_single_price', 20 );
      	add_action( 'woocommerce_single_variation','woocommerce_template_single_excerpt', 15 );
      }

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #42795
      jascom
      Support Expired
      This reply has been marked as private.
Viewing 7 reply threads

You must be logged in to reply to this topic.