Merge pull request #517 from patrickgarman/master
Deprecated PHP in a few lines.
This commit is contained in:
commit
48f2f296ad
|
@ -77,7 +77,7 @@ class woocommerce_cod extends woocommerce_payment_gateway {
|
|||
// Process the payment
|
||||
function process_payment ($order_id) {
|
||||
global $woocommerce;
|
||||
$order = &new woocommerce_order ($order_id);
|
||||
$order = new woocommerce_order ($order_id);
|
||||
$order->update_status('on-hold', __('Payment to be made upon delivery.', 'woocommerce'));
|
||||
$woocommerce->cart->empty_cart(); // Dump the cart
|
||||
unset($_SESSION['order_awaiting_payment']); // Lose our session
|
||||
|
|
|
@ -34,7 +34,7 @@ class local_delivery extends woocommerce_shipping_method {
|
|||
|
||||
function calculate_shipping() {
|
||||
global $woocommerce;
|
||||
$_tax = &new woocommerce_tax();
|
||||
$_tax = new woocommerce_tax();
|
||||
if ($this->type=='free') $shipping_total = 0;
|
||||
if ($this->type=='fixed') $shipping_total = $this->fee;
|
||||
if ($this->type=='percent') $shipping_total = $woocommerce->cart->cart_contents_total * ($this->fee/100);
|
||||
|
@ -85,7 +85,7 @@ class local_delivery extends woocommerce_shipping_method {
|
|||
|
||||
function admin_options() {
|
||||
global $woocommerce; ?>
|
||||
<h3><?php echo $this->method_title; ?></h3>
|
||||
<h3><?php echo $this->method_title; ?></h3>
|
||||
<p><?php _e('Local delivery is a simple shipping method for delivering orders locally.', 'woocommerce'); ?></p>
|
||||
<table class="form-table">
|
||||
<?php $this->generate_settings_html(); ?>
|
||||
|
|
|
@ -32,7 +32,7 @@ class local_pickup extends woocommerce_shipping_method {
|
|||
|
||||
function calculate_shipping() {
|
||||
global $woocommerce;
|
||||
$_tax = &new woocommerce_tax();
|
||||
$_tax = new woocommerce_tax();
|
||||
|
||||
$rate = array(
|
||||
'id' => $this->id,
|
||||
|
@ -62,7 +62,7 @@ class local_pickup extends woocommerce_shipping_method {
|
|||
|
||||
function admin_options() {
|
||||
global $woocommerce; ?>
|
||||
<h3><?php echo $this->method_title; ?></h3>
|
||||
<h3><?php echo $this->method_title; ?></h3>
|
||||
<p><?php _e('Local pickup is a simple method which allows the customer to pick up their order themselves.', 'woocommerce'); ?></p>
|
||||
<table class="form-table">
|
||||
<?php $this->generate_settings_html(); ?>
|
||||
|
|
Loading…
Reference in New Issue