Pay email changes

This commit is contained in:
Mike Jolley 2011-11-11 14:30:32 +00:00
parent 7cd7f4c201
commit e678fb50f6
3 changed files with 10 additions and 8 deletions

View File

@ -272,7 +272,7 @@ function woocommerce_order_actions_meta_box($post) {
<li><input type="submit" class="button" name="reduce_stock" value="<?php _e('Reduce stock', 'woothemes'); ?>" /> <?php _e('- Reduces stock for each item in the order; useful after manually creating an order or manually marking an order as complete/processing after payment.', 'woothemes'); ?></li>
<li><input type="submit" class="button" name="restore_stock" value="<?php _e('Restore stock', 'woothemes'); ?>" /> <?php _e('- Restores stock for each item in the order; useful after refunding or canceling the entire order.', 'woothemes'); ?></li>
<li><input type="submit" class="button" name="invoice" value="<?php _e('Email invoice', 'woothemes'); ?>" /> <?php _e('- Emails the customer order details and a payment link.', 'woothemes'); ?></li>
<li><input type="submit" class="button" name="invoice" value="<?php _e('Email invoice', 'woothemes'); ?>" /> <?php _e('- Emails the customer order details and a payment link (if the order is pending/unpaid).', 'woothemes'); ?></li>
<li>
<?php
@ -515,7 +515,7 @@ function woocommerce_process_shop_order_meta( $post_id, $post ) {
elseif (isset($_POST['invoice']) && $_POST['invoice']) :
// Mail link to customer
woocommerce_pay_for_order_customer_notification( $order->id );
woocommerce_pay_for_order_customer_notification( $order );
endif;

View File

@ -4,7 +4,11 @@
<?php do_action('woocommerce_email_header'); ?>
<p><?php echo sprintf( __("An order has been created for you on &ldquo;%s&rdquo;. To pay for this order please use the following link: %s", 'woothemes'), get_bloginfo('name'), $order->get_checkout_payment_url() ); ?></p>
<?php if ($order->status=='pending') : ?>
<p><?php echo sprintf( __("An order has been created for you on &ldquo;%s&rdquo;. To pay for this order please use the following link: %s", 'woothemes'), get_bloginfo('name'), $order->get_checkout_payment_url() ); ?></p>
<?php endif; ?>
<?php do_action('woocommerce_email_before_order_table', $order, false); ?>

View File

@ -188,15 +188,13 @@ function woocommerce_completed_order_customer_notification( $id ) {
/**
* Pay for order notification email template - this one includes a payment link
**/
function woocommerce_pay_for_order_customer_notification( $id ) {
function woocommerce_pay_for_order_customer_notification( $order ) {
global $order_id, $email_heading;
$order_id = $id;
$order_id = $order->id;
$order = &new woocommerce_order( $order_id );
$email_heading = __('Pay for Order', 'woothemes');
$email_heading = sprintf(__('Invoice for Order #%s', 'woothemes'), $order_id);
$subject = sprintf(__('[%s] Pay for Order', 'woothemes'), get_bloginfo('name'));