auth
6 years ago
cart
6 years ago
checkout
6 years ago
emails
6 years ago
global
6 years ago
loop
6 years ago
myaccount
6 years ago
notices
7 years ago
order
6 years ago
single-product
6 years ago
archive-product.php
6 years ago
content-product.php
7 years ago
content-product_cat.php
7 years ago
content-single-product.php
7 years ago
content-widget-price-filter.php
6 years ago
content-widget-product.php
7 years ago
content-widget-reviews.php
8 years ago
product-searchform.php
7 years ago
single-product-reviews.php
6 years ago
single-product.php
7 years ago
taxonomy-product_cat.php
8 years ago
taxonomy-product_tag.php
8 years ago
content-single-product.php
77 lines
| 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 | |
| 18 | defined( 'ABSPATH' ) || exit; |
| 19 | |
| 20 | global $product; |
| 21 | |
| 22 | /** |
| 23 | * Hook: woocommerce_before_single_product. |
| 24 | * |
| 25 | * @hooked wc_print_notices - 10 |
| 26 | */ |
| 27 | do_action( 'woocommerce_before_single_product' ); |
| 28 | |
| 29 | if ( post_password_required() ) { |
| 30 | echo get_the_password_form(); // WPCS: XSS ok. |
| 31 | return; |
| 32 | } |
| 33 | ?> |
| 34 | <div id="product-<?php the_ID(); ?>" <?php wc_product_class( '', $product ); ?>> |
| 35 | |
| 36 | <?php |
| 37 | /** |
| 38 | * Hook: woocommerce_before_single_product_summary. |
| 39 | * |
| 40 | * @hooked woocommerce_show_product_sale_flash - 10 |
| 41 | * @hooked woocommerce_show_product_images - 20 |
| 42 | */ |
| 43 | do_action( 'woocommerce_before_single_product_summary' ); |
| 44 | ?> |
| 45 | |
| 46 | <div class="summary entry-summary"> |
| 47 | <?php |
| 48 | /** |
| 49 | * Hook: woocommerce_single_product_summary. |
| 50 | * |
| 51 | * @hooked woocommerce_template_single_title - 5 |
| 52 | * @hooked woocommerce_template_single_rating - 10 |
| 53 | * @hooked woocommerce_template_single_price - 10 |
| 54 | * @hooked woocommerce_template_single_excerpt - 20 |
| 55 | * @hooked woocommerce_template_single_add_to_cart - 30 |
| 56 | * @hooked woocommerce_template_single_meta - 40 |
| 57 | * @hooked woocommerce_template_single_sharing - 50 |
| 58 | * @hooked WC_Structured_Data::generate_product_data() - 60 |
| 59 | */ |
| 60 | do_action( 'woocommerce_single_product_summary' ); |
| 61 | ?> |
| 62 | </div> |
| 63 | |
| 64 | <?php |
| 65 | /** |
| 66 | * Hook: woocommerce_after_single_product_summary. |
| 67 | * |
| 68 | * @hooked woocommerce_output_product_data_tabs - 10 |
| 69 | * @hooked woocommerce_upsell_display - 15 |
| 70 | * @hooked woocommerce_output_related_products - 20 |
| 71 | */ |
| 72 | do_action( 'woocommerce_after_single_product_summary' ); |
| 73 | ?> |
| 74 | </div> |
| 75 | |
| 76 | <?php do_action( 'woocommerce_after_single_product' ); ?> |
| 77 |