Fixes
This commit is contained in:
parent
733b51401c
commit
6dff689cb9
|
@ -111,6 +111,8 @@ class woocommerce_email {
|
|||
function new_order( $order_id ) {
|
||||
global $order, $email_heading;
|
||||
|
||||
$order = new woocommerce_order( $order_id );
|
||||
|
||||
$email_heading = __('New Customer Order', 'woothemes');
|
||||
|
||||
$subject = sprintf(__('[%s] New Customer Order (# %s)', 'woothemes'), get_bloginfo('name'), $order_id);
|
||||
|
@ -134,7 +136,7 @@ class woocommerce_email {
|
|||
function customer_processing_order( $order_id ) {
|
||||
global $order, $email_heading;
|
||||
|
||||
$order = &new woocommerce_order( $order_id );
|
||||
$order = new woocommerce_order( $order_id );
|
||||
|
||||
$email_heading = __('Order Received', 'woothemes');
|
||||
|
||||
|
@ -159,7 +161,7 @@ class woocommerce_email {
|
|||
function customer_completed_order( $order_id ) {
|
||||
global $order, $email_heading;
|
||||
|
||||
$order = &new woocommerce_order( $order_id );
|
||||
$order = new woocommerce_order( $order_id );
|
||||
|
||||
if ($order->has_downloadable_item) :
|
||||
$subject = __('[%s] Order Complete/Download Links', 'woothemes');
|
||||
|
@ -228,7 +230,7 @@ class woocommerce_email {
|
|||
|
||||
if (!$order_id || !$customer_note) return;
|
||||
|
||||
$order = &new woocommerce_order( $order_id );
|
||||
$order = new woocommerce_order( $order_id );
|
||||
|
||||
$email_heading = __('A note has been added to your order', 'woothemes');
|
||||
|
||||
|
@ -251,7 +253,7 @@ class woocommerce_email {
|
|||
* Low stock notification email
|
||||
**/
|
||||
function low_stock( $product ) {
|
||||
$_product = &new woocommerce_product($product);
|
||||
$_product = new woocommerce_product($product);
|
||||
|
||||
$subject = '[' . get_bloginfo('name') . '] ' . __('Product low in stock', 'woothemes');
|
||||
|
||||
|
@ -268,7 +270,7 @@ class woocommerce_email {
|
|||
* No stock notification email
|
||||
**/
|
||||
function no_stock( $product ) {
|
||||
$_product = &new woocommerce_product($product);
|
||||
$_product = new woocommerce_product($product);
|
||||
|
||||
$subject = '[' . get_bloginfo('name') . '] ' . __('Product out of stock', 'woothemes');
|
||||
|
||||
|
@ -298,7 +300,7 @@ class woocommerce_email {
|
|||
|
||||
if (!$product || !$quantity) return;
|
||||
|
||||
$_product = &new woocommerce_product($product);
|
||||
$_product = new woocommerce_product($product);
|
||||
|
||||
$subject = '[' . get_bloginfo('name') . '] ' . __('Product Backorder', 'woothemes');
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ function woocommerce_pay() {
|
|||
// Pay for existing order
|
||||
$order_key = urldecode( $_GET['order'] );
|
||||
$order_id = (int) $_GET['order_id'];
|
||||
$order = &new woocommerce_order( $order_id );
|
||||
$order = new woocommerce_order( $order_id );
|
||||
|
||||
if ($order->id == $order_id && $order->order_key == $order_key && in_array($order->status, array('pending', 'failed'))) :
|
||||
|
||||
|
@ -91,7 +91,7 @@ function woocommerce_pay() {
|
|||
|
||||
if ($order_id > 0) :
|
||||
|
||||
$order = &new woocommerce_order( $order_id );
|
||||
$order = new woocommerce_order( $order_id );
|
||||
|
||||
if ($order->order_key == $order_key && in_array($order->status, array('pending', 'failed'))) :
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ function woocommerce_thankyou( $atts ) {
|
|||
unset($_SESSION['order_awaiting_payment']);
|
||||
|
||||
if ($order_id > 0) :
|
||||
$order = &new woocommerce_order( $order_id );
|
||||
$order = new woocommerce_order( $order_id );
|
||||
if ($order->order_key != $order_key) :
|
||||
unset($order);
|
||||
endif;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php if (!defined('ABSPATH')) exit; ?>
|
||||
|
||||
<?php global $order_id, $woocommerce; $order = &new woocommerce_order( $order_id ); ?>
|
||||
<?php global $order, $woocommerce; ?>
|
||||
|
||||
<?php do_action('woocommerce_email_header'); ?>
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ class woocommerce {
|
|||
foreach ($email_actions as $action) add_action($action, array( &$this, 'send_transactional_email'));
|
||||
|
||||
// Actions for SSL
|
||||
if (!is_admin()) :
|
||||
if (!is_admin() || defined('DOING_AJAX')) :
|
||||
add_action( 'wp', array( &$this, 'ssl_redirect'));
|
||||
|
||||
$filters = array( 'post_thumbnail_html', 'widget_text', 'wp_get_attachment_url', 'wp_get_attachment_image_attributes', 'wp_get_attachment_url', 'option_siteurl', 'option_home', 'option_url', 'option_wpurl', 'option_stylesheet_url', 'option_template_url', 'script_loader_src', 'style_loader_src' );
|
||||
|
|
Loading…
Reference in New Issue