This commit is contained in:
Mike Jolley 2012-03-05 13:25:02 +00:00
parent c978c98562
commit 9a282ce3ab
5 changed files with 13 additions and 13 deletions

View File

@ -518,17 +518,21 @@ class WC_Checkout {
// Empty the Cart
$woocommerce->cart->empty_cart();
// Get redirect
$return_url = get_permalink(woocommerce_get_page_id('thanks'));
$return_url = add_query_arg('key', $order->order_key, add_query_arg('order', $order->id, $return_url));
// Redirect to success/confirmation/payment page
if (is_ajax()) :
echo json_encode(
array(
'redirect' => apply_filters( 'woocommerce_checkout_no_payment_needed_redirect', get_permalink(woocommerce_get_page_id('thanks')), $order)
'redirect' => apply_filters( 'woocommerce_checkout_no_payment_needed_redirect', $return_url, $order)
)
);
exit;
else :
wp_safe_redirect(
apply_filters( 'woocommerce_checkout_no_payment_needed_redirect', get_permalink(woocommerce_get_page_id('thanks')), $order)
apply_filters( 'woocommerce_checkout_no_payment_needed_redirect', $return_url, $order)
);
exit;
endif;

View File

@ -155,6 +155,8 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* When passing aggregate orders to paypal, include item names
* Localisation improvements
* Fix local method availability
* Show order even if free
* Removed duplicate order on tracking page
= 1.5 - 01/03/2012 =
* Quick edit products

View File

@ -81,12 +81,14 @@ function woocommerce_pay() {
<?php _e('Total:', 'woocommerce'); ?>
<strong><?php echo woocommerce_price($order->order_total); ?></strong>
</li>
<?php if ($order->payment_method_title) : ?>
<li class="method">
<?php _e('Payment method:', 'woocommerce'); ?>
<strong><?php
echo $order->payment_method_title;
?></strong>
</li>
<?php endif; ?>
</ul>
<?php do_action( 'woocommerce_receipt_' . $order->payment_method, $order_id ); ?>

View File

@ -44,12 +44,14 @@ global $woocommerce;
<?php _e('Total:', 'woocommerce'); ?>
<strong><?php echo woocommerce_price($order->order_total); ?></strong>
</li>
<?php if ($order->payment_method_title) : ?>
<li class="method">
<?php _e('Payment method:', 'woocommerce'); ?>
<strong><?php
echo $order->payment_method_title;
?></strong>
</li>
<?php endif; ?>
</ul>
<div class="clear"></div>

View File

@ -43,14 +43,4 @@ global $woocommerce;
endif;
?>
<?php do_action( 'woocommerce_view_order', $order->id ); ?>
<div style="width: 49%; float:left;">
<h2><?php _e('Billing Address', 'woocommerce'); ?></h2>
<p><?php echo $order->get_formatted_billing_address(); ?></p>
</div>
<div style="width: 49%; float:right;">
<h2><?php _e('Shipping Address', 'woocommerce'); ?></h2>
<p><?php echo $order->get_formatted_shipping_address(); ?></p>
</div>
<div class="clear"></div>
<?php do_action( 'woocommerce_view_order', $order->id ); ?>