Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. // Remove additional information tab
  2. add_filter( 'woocommerce_product_tabs', 'remove_additional_information_tab', 100, 1 );
  3. function remove_additional_information_tab( $tabs ) {
  4. unset($tabs['additional_information']);
  5.  
  6. return $tabs;
  7. }
  8.  
  9. // Add "additional information" after add to cart
  10. add_action( 'woocommerce_single_product_summary', 'additional_info_under_add_to_cart', 35 );
  11. function additional_info_under_add_to_cart() {
  12. global $product;
  13.  
  14. if ( $product && ( $product->has_attributes() || apply_filters( 'wc_product_enable_dimensions_display', $product->has_weight() || $product->has_dimensions() ) ) ) {
  15. wc_display_product_attributes( $product );
  16. }
  17. }
  18. // Change related products text
  19. add_filter( 'gettext', 'change_related_products_title', 10, 3 );
  20. add_filter( 'ngettext', 'change_related_products_title', 10, 3 );
  21. function change_related_products_title( $translated, $text, $domain ) {
  22. if( $text === 'Related products' && $domain === 'woocommerce' ){
  23. $translated = esc_html__( "Autres bijoux d'occasions recommandés", $domain );
  24. }
  25. return $translated;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement