Fixed coding standards
This commit is contained in:
parent
a9ba510732
commit
8d19832937
|
@ -936,7 +936,7 @@ class WC_Cart {
|
|||
if ( $product_data->managing_stock() ) {
|
||||
$products_qty_in_cart = $this->get_cart_item_quantities();
|
||||
|
||||
if ( isset( $products_qty_in_cart[ $product_data->get_stock_managed_by_id() ] ) && ! $product_data->has_enough_stock( $products_qty_in_cart[ $product_data->get_stock_managed_by_id() ] + $quantity ) ) {
|
||||
if ( isset( $products_qty_in_cart[ $product_data->get_stock_managed_by_id() ] ) && ! $product_data->has_enough_stock( $products_qty_in_cart[ $product_data->get_stock_managed_by_id() ] + $quantity ) ) {
|
||||
throw new Exception( sprintf(
|
||||
'<a href="%s" class="button wc-forward">%s</a> %s',
|
||||
wc_get_cart_url(),
|
||||
|
|
|
@ -37,15 +37,6 @@ class WC_Product_Variation extends WC_Product_Simple {
|
|||
'tax_class' => '',
|
||||
);
|
||||
|
||||
/**
|
||||
* Initialize simple product.
|
||||
*
|
||||
* @param mixed $product
|
||||
*/
|
||||
public function __construct( $product = 0 ) {
|
||||
parent::__construct( $product );
|
||||
}
|
||||
|
||||
/**
|
||||
* Prefix for action and filter hooks on data.
|
||||
*
|
||||
|
|
|
@ -64,7 +64,7 @@ class WC_Order_Data_Store_CPT extends Abstract_WC_Order_Data_Store_CPT implement
|
|||
'_date_paid',
|
||||
'_payment_tokens',
|
||||
'_billing_address_index',
|
||||
'_shipping_address_index'
|
||||
'_shipping_address_index',
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -155,7 +155,7 @@ class WC_Mock_WC_Data extends WC_Data {
|
|||
* @param string $content
|
||||
*/
|
||||
public function set_content( $content ) {
|
||||
$this->set_prop('content', $content );
|
||||
$this->set_prop( 'content', $content );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -346,6 +346,6 @@ class WC_Tests_Product_Data_Store extends WC_Unit_Test_Case {
|
|||
$loaded_variation = wc_get_product( $variation->get_id() );
|
||||
|
||||
$this->assertEquals( 'publish', $loaded_variation->get_status( 'edit' ) );
|
||||
$this->assertEquals( 'green', $loaded_variation->get_attributes( 'edit' )[ 'attribute_color' ] );
|
||||
$this->assertEquals( 'green', $loaded_variation->get_attributes( 'edit' )['attribute_color'] );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue