Ei kuvausta

content-single-product.php 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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.6.0
  16. */
  17. defined( 'ABSPATH' ) || exit;
  18. global $product;
  19. /**
  20. * Hook: woocommerce_before_single_product.
  21. *
  22. * @hooked woocommerce_output_all_notices - 10
  23. */
  24. do_action( 'woocommerce_before_single_product' );
  25. if ( post_password_required() ) {
  26. echo get_the_password_form(); // WPCS: XSS ok.
  27. return;
  28. }
  29. ?>
  30. <div id="product-<?php the_ID(); ?>" <?php wc_product_class( '', $product ); ?>>
  31. <?php
  32. /**
  33. * Hook: woocommerce_before_single_product_summary.
  34. *
  35. * @hooked woocommerce_show_product_sale_flash - 10
  36. * @hooked woocommerce_show_product_images - 20
  37. */
  38. do_action( 'woocommerce_before_single_product_summary' );
  39. ?>
  40. <div class="summary entry-summary">
  41. <?php
  42. /**
  43. * Hook: woocommerce_single_product_summary.
  44. *
  45. * @hooked woocommerce_template_single_title - 5
  46. * @hooked woocommerce_template_single_rating - 10
  47. * @hooked woocommerce_template_single_price - 10
  48. * @hooked woocommerce_template_single_excerpt - 20
  49. * @hooked woocommerce_template_single_add_to_cart - 30
  50. * @hooked woocommerce_template_single_meta - 40
  51. * @hooked woocommerce_template_single_sharing - 50
  52. * @hooked WC_Structured_Data::generate_product_data() - 60
  53. */
  54. do_action( 'woocommerce_single_product_summary' );
  55. ?>
  56. </div>
  57. <?php
  58. /**
  59. * Hook: woocommerce_after_single_product_summary.
  60. *
  61. * @hooked woocommerce_output_product_data_tabs - 10
  62. * @hooked woocommerce_upsell_display - 15
  63. * @hooked woocommerce_output_related_products - 20
  64. */
  65. do_action( 'woocommerce_after_single_product_summary' );
  66. ?>
  67. </div>
  68. <?php do_action( 'woocommerce_after_single_product' ); ?>