content-single-product.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. /**
  3. * The template for displaying product content in the single-product.php template
  4. *
  5. * This template can be overridden by copying it to yourtheme/woocommerce/content-single-product.php.
  6. *
  7. * HOWEVER, on occasion WooCommerce will need to update template files and you
  8. * (the theme developer) will need to copy the new files to your theme to
  9. * maintain compatibility. We try to do this as little as possible, but it does
  10. * happen. When this occurs the version of the template file will be bumped and
  11. * the readme will list any important changes.
  12. *
  13. * @see https://docs.woocommerce.com/document/template-structure/
  14. * @package WooCommerce/Templates
  15. * @version 3.4.0
  16. */
  17. defined( 'ABSPATH' ) || exit;
  18. /**
  19. * Hook: woocommerce_before_single_product.
  20. *
  21. * @hooked wc_print_notices - 10
  22. */
  23. do_action( 'woocommerce_before_single_product' );
  24. if ( post_password_required() ) {
  25. echo get_the_password_form(); // WPCS: XSS ok.
  26. return;
  27. }
  28. ?>
  29. <div id="product-<?php the_ID(); ?>" <?php wc_product_class(); ?>>
  30. <?php
  31. /**
  32. * Hook: woocommerce_before_single_product_summary.
  33. *
  34. * @hooked woocommerce_show_product_sale_flash - 10
  35. * @hooked woocommerce_show_product_images - 20
  36. */
  37. do_action( 'woocommerce_before_single_product_summary' );
  38. ?>
  39. <div class="summary entry-summary">
  40. <?php
  41. /**
  42. * Hook: woocommerce_single_product_summary.
  43. *
  44. * @hooked woocommerce_template_single_title - 5
  45. * @hooked woocommerce_template_single_rating - 10
  46. * @hooked woocommerce_template_single_price - 10
  47. * @hooked woocommerce_template_single_excerpt - 20
  48. * @hooked woocommerce_template_single_add_to_cart - 30
  49. * @hooked woocommerce_template_single_meta - 40
  50. * @hooked woocommerce_template_single_sharing - 50
  51. * @hooked WC_Structured_Data::generate_product_data() - 60
  52. */
  53. do_action( 'woocommerce_single_product_summary' );
  54. ?>
  55. </div>
  56. <?php
  57. /**
  58. * Hook: woocommerce_after_single_product_summary.
  59. *
  60. * @hooked woocommerce_output_product_data_tabs - 10
  61. * @hooked woocommerce_upsell_display - 15
  62. * @hooked woocommerce_output_related_products - 20
  63. */
  64. do_action( 'woocommerce_after_single_product_summary' );
  65. ?>
  66. </div>
  67. <?php do_action( 'woocommerce_after_single_product' ); ?>