Advertisement
milanuptech

content-single-product.php

Apr 10th, 2018
1,500
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.38 KB | None | 0 0
  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.  * @author      WooThemes
  15.  * @package     WooCommerce/Templates
  16.  * @version     3.0.0
  17.  */
  18.  
  19. if ( ! defined( 'ABSPATH' ) ) {
  20.     exit;
  21. }
  22.  
  23. /**
  24.  * Hook Woocommerce_before_single_product.
  25.  *
  26.  * @hooked wc_print_notices - 10
  27.  */
  28. do_action( 'woocommerce_before_single_product' );
  29.  
  30. if ( post_password_required() ) {
  31.     echo get_the_password_form(); // WPCS: XSS ok.
  32.     return;
  33. }
  34. ?>
  35. <div id="product-<?php the_ID(); ?>" <?php post_class(); ?>>
  36.     <div class="row">
  37.         <div class="col-5">
  38.             <?php
  39.                 /**
  40.                  * Hook: woocommerce_before_single_product_summary.
  41.                  *
  42.                  * @hooked woocommerce_show_product_sale_flash - 10
  43.                  * @hooked woocommerce_show_product_images - 20
  44.                  */
  45.                 do_action( 'woocommerce_before_single_product_summary' );
  46.             ?>
  47.         <div class="col-7">
  48.             <?php
  49.                 /**
  50.                  * Hook: Woocommerce_single_product_summary.
  51.                  *
  52.                  * @hooked woocommerce_template_single_title - 5
  53.                  * @hooked woocommerce_template_single_rating - 10
  54.                  * @hooked woocommerce_template_single_price - 10
  55.                  * @hooked woocommerce_template_single_excerpt - 20
  56.                  * @hooked woocommerce_template_single_add_to_cart - 30
  57.                  * @hooked woocommerce_template_single_meta - 40
  58.                  * @hooked woocommerce_template_single_sharing - 50
  59.                  * @hooked WC_Structured_Data::generate_product_data() - 60
  60.                  */
  61.                 do_action( 'woocommerce_single_product_summary' );
  62.             ?>
  63.         </div>
  64.     </div>
  65.  
  66.     <?php
  67.         /**
  68.          * Hook: woocommerce_after_single_product_summary.
  69.          *
  70.          * @hooked woocommerce_output_product_data_tabs - 10
  71.          * @hooked woocommerce_upsell_display - 15
  72.          * @hooked woocommerce_output_related_products - 20
  73.          */
  74.         do_action( 'woocommerce_after_single_product_summary' );
  75.     ?>
  76. </div>
  77.  
  78. <?php do_action( 'woocommerce_after_single_product' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement