Description up above cart

I need long description insert to short description or long description display under short description.

e.g.: https://www.guess.eu/en/catalog/view/women/apparel/dresses/dress-with-crossover-detail/w92k0mk8j00?color=p79f

But description up above cart.

Can you help me with this problem?

My function (my frist custom function :slight_smile: ):

add_filter( 'woocommerce_short_description', 'x_description_in_short_description' );
function x_description_in_short_description(){
	if( is_product() || is_cart() || is_checkout() || x_is_product_category()){
		$heading = apply_filters( 'woocommerce_product_description_heading', __( 'Description', 'woocommerce' ) );  
		if ( $heading ) :
			esc_html( $heading ); 
		endif;
			the_content();
	}
}

Not right because when I have variables with product are display twice description. Can you help me?

Hello Teem,

Thanks for writing in!

Can you please elaborate this part of the question as I am not very clear about the query you have:

To avoid any confusion please elaborate the question and we will be happy to assist you.

Thanks.

I need description insert on the place short description but display short description too (if short description not empty). How on image.

Hello @matuskm,

If you want to move the product description to from the default location to replace the short description, please install and activate the child theme and login through FTP then edit the functions.php then add this code:

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );

remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
add_action( 'woocommerce_single_product_summary', 'the_content', 20 );

Hope this helps.

Nice. Thank you!

And I have some questions. Where can I learn create function with X theme or for WP or for WC, generally? Is it possible? Are some tutorial?

Sorry when not belong these questions here :slight_smile:

Hey Teem,

For X/Pro customization using actions and filters you can refer to our guide here https://theme.co/apex/forum/t/customizations-actions-and-filters-in-x-pro/208 for WooCommerce you can follow https://docs.woocommerce.com/document/introduction-to-hooks-actions-and-filters/ and for the WordPress, here’s the guide https://codex.wordpress.org/Plugin_API#Hooks:_Actions_and_Filters

Hope this helps!

Thank you very much :slight_smile:

You’re most welcome, Teem.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.