Fixed coding standards
This commit is contained in:
parent
48c93d5293
commit
486a81bf12
|
@ -269,10 +269,10 @@ return array(
|
|||
'state' => '',
|
||||
'rate' => '24.0000',
|
||||
'name' => 'ALV',
|
||||
'shipping' => true
|
||||
)
|
||||
)
|
||||
)
|
||||
'shipping' => true,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
'FR' => array(
|
||||
'currency_code' => 'EUR',
|
||||
|
|
|
@ -533,7 +533,7 @@ class WC_REST_Customers_V1_Controller extends WC_REST_Controller {
|
|||
'username' => $_data['username'],
|
||||
'last_order' => array(
|
||||
'id' => is_object( $last_order ) ? $last_order->get_id() : null,
|
||||
'date' => is_object( $last_order ) ? wc_rest_prepare_date_response( get_gmt_from_date( date( 'Y-m-d H:i:s', $last_order->get_date_created() ) ) ) : null
|
||||
'date' => is_object( $last_order ) ? wc_rest_prepare_date_response( get_gmt_from_date( date( 'Y-m-d H:i:s', $last_order->get_date_created() ) ) ) : null,
|
||||
),
|
||||
'orders_count' => $customer->get_order_count(),
|
||||
'total_spent' => $customer->get_total_spent(),
|
||||
|
|
|
@ -199,7 +199,7 @@ class WC_REST_Products_V1_Controller extends WC_REST_Posts_Controller {
|
|||
$args['meta_query'][] = array(
|
||||
'key' => '_sku',
|
||||
'value' => $request['sku'],
|
||||
'compare' => '='
|
||||
'compare' => '=',
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -972,7 +972,7 @@ class WC_Checkout {
|
|||
|
||||
$value = apply_filters( 'woocommerce_checkout_get_value', null, $input );
|
||||
|
||||
if ( $value !== null ) {
|
||||
if ( null !== $value ) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ class WC_Customer_Download_Data_Store implements WC_Customer_Download_Data_Store
|
|||
'downloads_remaining' => $download->get_downloads_remaining(),
|
||||
'access_granted' => date( 'Y-m-d', $download->get_access_granted() ),
|
||||
'download_count' => $download->get_download_count(),
|
||||
'access_expires' => $download->get_access_expires() ? date( 'Y-m-d', $download->get_access_expires() ) : NULL,
|
||||
'access_expires' => $download->get_access_expires() ? date( 'Y-m-d', $download->get_access_expires() ) : null,
|
||||
);
|
||||
|
||||
$format = array(
|
||||
|
@ -96,7 +96,7 @@ class WC_Customer_Download_Data_Store implements WC_Customer_Download_Data_Store
|
|||
'downloads_remaining' => $download->get_downloads_remaining(),
|
||||
'access_granted' => date( 'Y-m-d', $download->get_access_granted() ),
|
||||
'download_count' => $download->get_download_count(),
|
||||
'access_expires' => $download->get_access_expires() ? date( 'Y-m-d', $download->get_access_expires() ) : NULL,
|
||||
'access_expires' => $download->get_access_expires() ? date( 'Y-m-d', $download->get_access_expires() ) : null,
|
||||
);
|
||||
|
||||
$format = array(
|
||||
|
|
|
@ -49,7 +49,7 @@ class WC_Email_Cancelled_Order extends WC_Email {
|
|||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ) {
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
|
|||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ) {
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ class WC_Email_Customer_Invoice extends WC_Email {
|
|||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ) {
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class WC_Email_Customer_On_Hold_Order extends WC_Email {
|
|||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ) {
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class WC_Email_Customer_Processing_Order extends WC_Email {
|
|||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ) {
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class WC_Email_Failed_Order extends WC_Email {
|
|||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ) {
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class WC_Email_New_Order extends WC_Email {
|
|||
* @param WC_Order $order Order object.
|
||||
*/
|
||||
public function trigger( $order_id, $order = false ) {
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ){
|
||||
if ( $order_id && ! is_a( $order, 'WC_Order' ) ) {
|
||||
$order = wc_get_order( $order_id );
|
||||
}
|
||||
|
||||
|
|
|
@ -44,12 +44,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
$values = array();
|
||||
|
||||
if ( $attribute->is_taxonomy() ) {
|
||||
|
||||
$attribute_taxonomy = $attribute->get_taxonomy_object();
|
||||
$attribute_values = wc_get_product_terms( $product->get_id(), $attribute->get_name(), array( 'fields' => 'all' ) );
|
||||
|
||||
foreach ( $attribute_values as $attribute_value ) {
|
||||
|
||||
$value_name = esc_html( $attribute_value->name );
|
||||
|
||||
if ( $attribute_taxonomy->attribute_public ) {
|
||||
|
@ -57,17 +55,13 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
} else {
|
||||
$values[] = $value_name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$values = $attribute->get_options();
|
||||
|
||||
foreach ( $values as &$value ) {
|
||||
$value = esc_html( $value );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_attribute', wpautop( wptexturize( implode( ', ', $values ) ) ), $attribute, $values );
|
||||
|
|
|
@ -368,7 +368,7 @@ class Product_Reviews extends WC_REST_Unit_Test_Case {
|
|||
),
|
||||
'delete' => array(
|
||||
$review_2_id,
|
||||
$review_3_id
|
||||
$review_3_id,
|
||||
),
|
||||
'create' => array(
|
||||
array(
|
||||
|
|
Loading…
Reference in New Issue