Woocommerce email templates placed in the right folder
authorLaury GvR <laury@gaslightmedia.com>
Wed, 10 May 2017 21:11:44 +0000 (17:11 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 10 May 2017 21:11:44 +0000 (17:11 -0400)
woocommerce/DNU_content-product_cat.php [deleted file]
woocommerce/emails/customer-processing-order.php [new file with mode: 0644]
woocommerce/emails/email-order-details.php [new file with mode: 0644]
woocommerce/loop/DNU_add-to-cart.php [deleted file]
woocommerce/templates/emails/customer-processing-order.php [deleted file]
woocommerce/templates/emails/email-order-details.php [deleted file]

diff --git a/woocommerce/DNU_content-product_cat.php b/woocommerce/DNU_content-product_cat.php
deleted file mode 100644 (file)
index ceaf439..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-/**
- * The template for displaying product category thumbnails within loops.
- *
- * Override this template by copying it to yourtheme/woocommerce/content-product_cat.php
- *
- * @author             WooThemes
- * @package    WooCommerce/Templates
- * @version     2.5.2
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
-       exit; // Exit if accessed directly
-}
-
-global $woocommerce_loop;
-
-
-/* 
- *     Exclude certain categories - Chuck Scott - 5/28/15
- *     Enter the slug of a category to exclude in the 
- &     $excludeCats array below.
-*/
-//$excludeCats = array(
-//     'souvenir'
-//);
-if ( is_shop() && is_array($excludeCats) && in_array( $category->slug, $excludeCats ) ) {
-       return;
-}
-
-
-// Store loop count we're currently on
-if ( empty( $woocommerce_loop['loop'] ) )
-       $woocommerce_loop['loop'] = 0;
-
-// Store column count for displaying the grid
-if ( empty( $woocommerce_loop['columns'] ) )
-       $woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 4 );
-
-// Increase loop count
-$woocommerce_loop['loop']++;
-?>
-
-
-<?php if ( $category->count > 0 ) { ?>
-<li class="product-category product<?php
-    if ( ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] == 0 || $woocommerce_loop['columns'] == 1 )
-        echo ' first';
-       if ( $woocommerce_loop['loop'] % $woocommerce_loop['columns'] == 0 )
-               echo ' last';
-       ?>">
-
-       <?php do_action( 'woocommerce_before_subcategory', $category ); ?>
-
-        <?php
-                /**
-                 * woocommerce_before_subcategory_title hook
-                 *
-                 * @hooked woocommerce_subcategory_thumbnail - 10
-                 */
-                do_action( 'woocommerce_before_subcategory_title', $category );
-        ?>
-
-        <h3>
-                <?php
-                        echo $category->name;
-                ?>
-        </h3>
-
-        <?php
-                /**
-                 * woocommerce_after_subcategory_title hook
-                 */
-                do_action( 'woocommerce_after_subcategory_title', $category );
-        ?>
-    
-       <?php do_action( 'woocommerce_after_subcategory', $category ); ?>
-
-</li>
-<?php } ?>
diff --git a/woocommerce/emails/customer-processing-order.php b/woocommerce/emails/customer-processing-order.php
new file mode 100644 (file)
index 0000000..7d305bb
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Customer processing order email
+ *
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-processing-order.php.
+ *
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
+ * (the theme developer) will need to copy the new files to your theme to
+ * maintain compatibility. We try to do this as little as possible, but it does
+ * happen. When this occurs the version of the template file will be bumped and
+ * the readme will list any important changes.
+ *
+ * @see            https://docs.woocommerce.com/document/template-structure/
+ * @author             WooThemes
+ * @package    WooCommerce/Templates/Emails
+ * @version     2.5.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+       exit;
+}
+
+/**
+ * @hooked WC_Emails::email_header() Output the email header
+ */
+do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
+
+<p><?php _e( "Your vote(s) have been received and will be counted toward the final 12 selections for the Munising Hockey Association calendar. Your voting details are shown below for your reference:", 'woocommerce' ); ?></p>
+
+<?php
+
+/**
+ * @hooked WC_Emails::order_details() Shows the order details table.
+ * @hooked WC_Emails::order_schema_markup() Adds Schema.org markup.
+ * @since 2.5.0
+ */
+do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
+
+/**
+ * @hooked WC_Emails::order_meta() Shows order meta data.
+ */
+do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
+
+/**
+ * @hooked WC_Emails::customer_details() Shows customer details
+ * @hooked WC_Emails::email_address() Shows email address
+ */
+do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
+
+/**
+ * @hooked WC_Emails::email_footer() Output the email footer
+ */
+do_action( 'woocommerce_email_footer', $email );
diff --git a/woocommerce/emails/email-order-details.php b/woocommerce/emails/email-order-details.php
new file mode 100644 (file)
index 0000000..6873138
--- /dev/null
@@ -0,0 +1,64 @@
+<?php
+/**
+ * Order details table shown in emails.
+ *
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-details.php.
+ *
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
+ * (the theme developer) will need to copy the new files to your theme to
+ * maintain compatibility. We try to do this as little as possible, but it does
+ * happen. When this occurs the version of the template file will be bumped and
+ * the readme will list any important changes.
+ *
+ * @see            https://docs.woocommerce.com/document/template-structure/
+ * @author             WooThemes
+ * @package    WooCommerce/Templates/Emails
+ * @version     2.5.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+       exit;
+}
+
+do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>
+
+<?php if ( ! $sent_to_admin ) : ?>
+       <h2><?php printf( __( 'Order #%s', 'woocommerce' ), $order->get_order_number() ); ?></h2>
+<?php else : ?>
+       <h2><a class="link" href="<?php echo esc_url( admin_url( 'post.php?post=' . $order->id . '&action=edit' ) ); ?>"><?php printf( __( 'Order #%s', 'woocommerce'), $order->get_order_number() ); ?></a> (<?php printf( '<time datetime="%s">%s</time>', date_i18n( 'c', strtotime( $order->order_date ) ), date_i18n( wc_date_format(), strtotime( $order->order_date ) ) ); ?>)</h2>
+<?php endif; ?>
+
+<table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" border="1">
+       <thead>
+               <tr>
+                       <th class="td" scope="col" style="text-align:left;"><?php _e( 'Product', 'woocommerce' ); ?></th>
+                       <th class="td" scope="col" style="text-align:left;"><?php _e( 'Quantity', 'woocommerce' ); ?></th>
+                       <th class="td" scope="col" style="text-align:left;"><?php _e( 'Price', 'woocommerce' ); ?></th>
+               </tr>
+       </thead>
+       <tbody>
+               <?php echo $order->email_order_items_table( array(
+                       'show_sku'      => $sent_to_admin,
+                       'show_image'    => false,
+                       'image_size'    => array( 32, 32 ),
+                       'plain_text'    => $plain_text,
+                       'sent_to_admin' => $sent_to_admin
+               ) ); ?>
+       </tbody>
+       <tfoot>
+               <?php
+                       if ( $totals = $order->get_order_item_totals() ) {
+                               $i = 0;
+                               foreach ( $totals as $total ) {
+                                       $i++;
+                                       ?><tr>
+                                               <th class="td" scope="row" colspan="2" style="text-align:left; <?php if ( $i === 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['label']; ?></th>
+                                               <td class="td" style="text-align:left; <?php if ( $i === 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['value']; ?></td>
+                                       </tr><?php
+                               }
+                       }
+               ?>
+       </tfoot>
+</table>
+
+<?php do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>
diff --git a/woocommerce/loop/DNU_add-to-cart.php b/woocommerce/loop/DNU_add-to-cart.php
deleted file mode 100644 (file)
index 2c7d69e..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
- * Loop Add to Cart
- *
- * This template can be overridden by copying it to yourtheme/woocommerce/loop/add-to-cart.php.
- *
- * HOWEVER, on occasion WooCommerce will need to update template files and you
- * (the theme developer) will need to copy the new files to your theme to
- * maintain compatibility. We try to do this as little as possible, but it does
- * happen. When this occurs the version of the template file will be bumped and
- * the readme will list any important changes.
- *
- * @see            https://docs.woocommerce.com/document/template-structure/
- * @author             WooThemes
- * @package    WooCommerce/Templates
- * @version     2.5.0
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
-       exit;
-}
-
-global $product;
-
-// The code below is to give the downloadable map on the trail pages a proper button
-//  text, while making sure that the button keeps the default "Add to Cart" text otherwise
-//  (which can be changed through a WooC filter)
-$terms = wp_get_post_terms( $product->id, 'product_cat' );
-foreach ( $terms as $term ) $categories[] = $term->slug;
-
-echo apply_filters( 'woocommerce_loop_add_to_cart_link',
-       sprintf( '<a rel="nofollow" href="%s" data-quantity="%s" data-product_id="%s" data-product_sku="%s" class="%s glm-member-detail-woo-link">VOTE2</a>',
-               esc_url( $product->add_to_cart_url() ),
-               esc_attr( isset( $quantity ) ? $quantity : 1 ),
-               esc_attr( $product->id ),
-               esc_attr( $product->get_sku() ),
-               esc_attr( isset( $class ) ? $class : 'button' ),
-               esc_html( $product->add_to_cart_text() )
-       ),
-$product );
diff --git a/woocommerce/templates/emails/customer-processing-order.php b/woocommerce/templates/emails/customer-processing-order.php
deleted file mode 100644 (file)
index 7d305bb..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/**
- * Customer processing order email
- *
- * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-processing-order.php.
- *
- * HOWEVER, on occasion WooCommerce will need to update template files and you
- * (the theme developer) will need to copy the new files to your theme to
- * maintain compatibility. We try to do this as little as possible, but it does
- * happen. When this occurs the version of the template file will be bumped and
- * the readme will list any important changes.
- *
- * @see            https://docs.woocommerce.com/document/template-structure/
- * @author             WooThemes
- * @package    WooCommerce/Templates/Emails
- * @version     2.5.0
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
-       exit;
-}
-
-/**
- * @hooked WC_Emails::email_header() Output the email header
- */
-do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
-
-<p><?php _e( "Your vote(s) have been received and will be counted toward the final 12 selections for the Munising Hockey Association calendar. Your voting details are shown below for your reference:", 'woocommerce' ); ?></p>
-
-<?php
-
-/**
- * @hooked WC_Emails::order_details() Shows the order details table.
- * @hooked WC_Emails::order_schema_markup() Adds Schema.org markup.
- * @since 2.5.0
- */
-do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
-
-/**
- * @hooked WC_Emails::order_meta() Shows order meta data.
- */
-do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
-
-/**
- * @hooked WC_Emails::customer_details() Shows customer details
- * @hooked WC_Emails::email_address() Shows email address
- */
-do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
-
-/**
- * @hooked WC_Emails::email_footer() Output the email footer
- */
-do_action( 'woocommerce_email_footer', $email );
diff --git a/woocommerce/templates/emails/email-order-details.php b/woocommerce/templates/emails/email-order-details.php
deleted file mode 100644 (file)
index 6873138..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-/**
- * Order details table shown in emails.
- *
- * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-details.php.
- *
- * HOWEVER, on occasion WooCommerce will need to update template files and you
- * (the theme developer) will need to copy the new files to your theme to
- * maintain compatibility. We try to do this as little as possible, but it does
- * happen. When this occurs the version of the template file will be bumped and
- * the readme will list any important changes.
- *
- * @see            https://docs.woocommerce.com/document/template-structure/
- * @author             WooThemes
- * @package    WooCommerce/Templates/Emails
- * @version     2.5.0
- */
-
-if ( ! defined( 'ABSPATH' ) ) {
-       exit;
-}
-
-do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>
-
-<?php if ( ! $sent_to_admin ) : ?>
-       <h2><?php printf( __( 'Order #%s', 'woocommerce' ), $order->get_order_number() ); ?></h2>
-<?php else : ?>
-       <h2><a class="link" href="<?php echo esc_url( admin_url( 'post.php?post=' . $order->id . '&action=edit' ) ); ?>"><?php printf( __( 'Order #%s', 'woocommerce'), $order->get_order_number() ); ?></a> (<?php printf( '<time datetime="%s">%s</time>', date_i18n( 'c', strtotime( $order->order_date ) ), date_i18n( wc_date_format(), strtotime( $order->order_date ) ) ); ?>)</h2>
-<?php endif; ?>
-
-<table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" border="1">
-       <thead>
-               <tr>
-                       <th class="td" scope="col" style="text-align:left;"><?php _e( 'Product', 'woocommerce' ); ?></th>
-                       <th class="td" scope="col" style="text-align:left;"><?php _e( 'Quantity', 'woocommerce' ); ?></th>
-                       <th class="td" scope="col" style="text-align:left;"><?php _e( 'Price', 'woocommerce' ); ?></th>
-               </tr>
-       </thead>
-       <tbody>
-               <?php echo $order->email_order_items_table( array(
-                       'show_sku'      => $sent_to_admin,
-                       'show_image'    => false,
-                       'image_size'    => array( 32, 32 ),
-                       'plain_text'    => $plain_text,
-                       'sent_to_admin' => $sent_to_admin
-               ) ); ?>
-       </tbody>
-       <tfoot>
-               <?php
-                       if ( $totals = $order->get_order_item_totals() ) {
-                               $i = 0;
-                               foreach ( $totals as $total ) {
-                                       $i++;
-                                       ?><tr>
-                                               <th class="td" scope="row" colspan="2" style="text-align:left; <?php if ( $i === 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['label']; ?></th>
-                                               <td class="td" style="text-align:left; <?php if ( $i === 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['value']; ?></td>
-                                       </tr><?php
-                               }
-                       }
-               ?>
-       </tfoot>
-</table>
-
-<?php do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>