add_filter( 'woocommerce_product_tabs', 'reorder_woocommerce_product_tabs', 98 ); function reorder_woocommerce_product_tabs( $tabs ) { $tabs['reviews']['priority'] = 5; // Reviews first $tabs['description']['priority'] = 10; // Description second $tabs['additional_information']['priority'] = 15; // Additional information third return $tabs; }
Tag Archives: WordPress
Hide excerpts for all WordPress posts
add_filter( 'the_excerpt', 'custom_excerpt' ); function custom_excerpt() { return ''; }
Control excerpt length in WordPress
function custom_excerpt_length( $length ) { return 20; } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
Show trailing zeros on prices in WooCommerce
// Show trailing zeros on prices, default is to hide it. add_filter( 'woocommerce_price_trim_zeros', 'wc_hide_trailing_zeros', 10, 1 ); function wc_hide_trailing_zeros( $trim ) { // set to false to show trailing zeros return false; }