Merge remote-tracking branch 'upstream/master' into tweak-styles

This commit is contained in:
Shiva Poudel 2015-10-01 14:04:21 +05:45
commit 6428ec6cfb
3 changed files with 5 additions and 29 deletions

View File

@ -470,12 +470,6 @@ class WC_API_Orders extends WC_API_Resource {
update_post_meta( $order->id, '_order_currency', $data['currency'] );
}
// set order number
if ( isset( $data['order_number'] ) ) {
update_post_meta( $order->id, '_order_number', $data['order_number'] );
}
// set order meta
if ( isset( $data['order_meta'] ) && is_array( $data['order_meta'] ) ) {
$this->set_order_meta( $order->id, $data['order_meta'] );
@ -640,12 +634,6 @@ class WC_API_Orders extends WC_API_Resource {
update_post_meta( $order->id, '_order_currency', $data['currency'] );
}
// set order number
if ( isset( $data['order_number'] ) ) {
update_post_meta( $order->id, '_order_number', $data['order_number'] );
}
// if items have changed, recalculate order totals
if ( $update_totals ) {
$order->calculate_totals();

View File

@ -470,12 +470,6 @@ class WC_API_Orders extends WC_API_Resource {
update_post_meta( $order->id, '_order_currency', $data['currency'] );
}
// set order number
if ( isset( $data['order_number'] ) ) {
update_post_meta( $order->id, '_order_number', $data['order_number'] );
}
// set order meta
if ( isset( $data['order_meta'] ) && is_array( $data['order_meta'] ) ) {
$this->set_order_meta( $order->id, $data['order_meta'] );
@ -640,12 +634,6 @@ class WC_API_Orders extends WC_API_Resource {
update_post_meta( $order->id, '_order_currency', $data['currency'] );
}
// set order number
if ( isset( $data['order_number'] ) ) {
update_post_meta( $order->id, '_order_number', $data['order_number'] );
}
// if items have changed, recalculate order totals
if ( $update_totals ) {
$order->calculate_totals();

View File

@ -1899,12 +1899,12 @@ class WC_Cart {
/*-----------------------------------------------------------------------------------*/
/**
* add_fee function.
* Add additional fee to the cart
*
* @param mixed $name
* @param mixed $amount
* @param bool $taxable (default: false)
* @param string $tax_class (default: '')
* @param string $name Unique name for the fee. Multiple fees of the same name cannot be added.
* @param float $amount Fee amount.
* @param bool $taxable (default: false) Is the fee taxable?
* @param string $tax_class (default: '') The tax class for the fee if taxable. A blank string is standard tax class.
*/
public function add_fee( $name, $amount, $taxable = false, $tax_class = '' ) {