PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket
This commit is contained in:
parent
d922d045a7
commit
8fe4cd65a4
|
@ -1060,7 +1060,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
||||||
|
|
||||||
$token_ids = get_post_meta( $this->get_id(), '_payment_tokens', true );
|
$token_ids = get_post_meta( $this->get_id(), '_payment_tokens', true );
|
||||||
|
|
||||||
if ( empty ( $token_ids ) ) {
|
if ( empty( $token_ids ) ) {
|
||||||
$token_ids = array();
|
$token_ids = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1296,7 +1296,7 @@ class WC_Admin_Post_Types {
|
||||||
case 3 :
|
case 3 :
|
||||||
if ( strstr( $regular_price, '%' ) ) {
|
if ( strstr( $regular_price, '%' ) ) {
|
||||||
$percent = str_replace( '%', '', $regular_price ) / 100;
|
$percent = str_replace( '%', '', $regular_price ) / 100;
|
||||||
$new_price = max( 0, $old_regular_price - ( round ( $old_regular_price * $percent, wc_get_price_decimals() ) ) );
|
$new_price = max( 0, $old_regular_price - ( round( $old_regular_price * $percent, wc_get_price_decimals() ) ) );
|
||||||
} else {
|
} else {
|
||||||
$new_price = max( 0, $old_regular_price - $regular_price );
|
$new_price = max( 0, $old_regular_price - $regular_price );
|
||||||
}
|
}
|
||||||
|
|
|
@ -328,7 +328,7 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
|
||||||
echo '<td class="status">';
|
echo '<td class="status">';
|
||||||
|
|
||||||
if ( $gateway->enabled == 'yes' )
|
if ( $gateway->enabled == 'yes' )
|
||||||
echo '<span class="status-enabled tips" data-tip="' . __ ( 'Yes', 'woocommerce' ) . '">' . __ ( 'Yes', 'woocommerce' ) . '</span>';
|
echo '<span class="status-enabled tips" data-tip="' . __( 'Yes', 'woocommerce' ) . '">' . __( 'Yes', 'woocommerce' ) . '</span>';
|
||||||
else
|
else
|
||||||
echo '-';
|
echo '-';
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ class WC_REST_System_Status_Tools_Controller extends WC_REST_Controller {
|
||||||
public function get_items( $request ) {
|
public function get_items( $request ) {
|
||||||
$tools = array();
|
$tools = array();
|
||||||
foreach ( $this->get_tools() as $id => $tool ) {
|
foreach ( $this->get_tools() as $id => $tool ) {
|
||||||
$tools[] = $this->prepare_response_for_collection( $this->prepare_item_for_response ( array(
|
$tools[] = $this->prepare_response_for_collection( $this->prepare_item_for_response( array(
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'name' => $tool['name'],
|
'name' => $tool['name'],
|
||||||
'action' => $tool['button'],
|
'action' => $tool['button'],
|
||||||
|
@ -189,7 +189,7 @@ class WC_REST_System_Status_Tools_Controller extends WC_REST_Controller {
|
||||||
return new WP_Error( 'woocommerce_rest_system_status_tool_invalid_id', __( 'Invalid tool ID.', 'woocommerce' ), array( 'status' => 404 ) );
|
return new WP_Error( 'woocommerce_rest_system_status_tool_invalid_id', __( 'Invalid tool ID.', 'woocommerce' ), array( 'status' => 404 ) );
|
||||||
}
|
}
|
||||||
$tool = $tools[ $request['id'] ];
|
$tool = $tools[ $request['id'] ];
|
||||||
return rest_ensure_response( $this->prepare_item_for_response ( array(
|
return rest_ensure_response( $this->prepare_item_for_response( array(
|
||||||
'id' => $request['id'],
|
'id' => $request['id'],
|
||||||
'name' => $tool['name'],
|
'name' => $tool['name'],
|
||||||
'action' => $tool['button'],
|
'action' => $tool['button'],
|
||||||
|
|
|
@ -1152,7 +1152,7 @@ class WC_Customer extends WC_Legacy_Customer {
|
||||||
'username' => $user_object->user_login,
|
'username' => $user_object->user_login,
|
||||||
'date_created' => strtotime( $user_object->user_registered ),
|
'date_created' => strtotime( $user_object->user_registered ),
|
||||||
'date_modified' => get_user_meta( $id, 'last_update', true ),
|
'date_modified' => get_user_meta( $id, 'last_update', true ),
|
||||||
'role' => ! empty ( $user_object->roles[0] ) ? $user_object->roles[0] : 'customer',
|
'role' => ! empty( $user_object->roles[0] ) ? $user_object->roles[0] : 'customer',
|
||||||
) );
|
) );
|
||||||
$this->read_meta_data();
|
$this->read_meta_data();
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,7 @@ class WC_Payment_Tokens {
|
||||||
*/
|
*/
|
||||||
public static function delete( $token_id ) {
|
public static function delete( $token_id ) {
|
||||||
$type = self::get_token_type_by_id( $token_id );
|
$type = self::get_token_type_by_id( $token_id );
|
||||||
if ( ! empty ( $type ) ) {
|
if ( ! empty( $type ) ) {
|
||||||
$class = 'WC_Payment_Token_' . $type;
|
$class = 'WC_Payment_Token_' . $type;
|
||||||
$token = new $class( $token_id );
|
$token = new $class( $token_id );
|
||||||
$token->delete();
|
$token->delete();
|
||||||
|
|
|
@ -311,7 +311,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway_CC {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function add_payment_method() {
|
public function add_payment_method() {
|
||||||
if ( empty ( $_POST['simplify_token'] ) ) {
|
if ( empty( $_POST['simplify_token'] ) ) {
|
||||||
wc_add_notice( __( 'There was a problem adding this card.', 'woocommerce' ), 'error' );
|
wc_add_notice( __( 'There was a problem adding this card.', 'woocommerce' ), 'error' );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -428,11 +428,11 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway_CC {
|
||||||
// or the customer token (just saved method, previously saved method)
|
// or the customer token (just saved method, previously saved method)
|
||||||
$pass_tokens = array();
|
$pass_tokens = array();
|
||||||
|
|
||||||
if ( ! empty ( $cart_token ) ) {
|
if ( ! empty( $cart_token ) ) {
|
||||||
$pass_tokens['token'] = $cart_token;
|
$pass_tokens['token'] = $cart_token;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty ( $customer_token ) ) {
|
if ( ! empty( $customer_token ) ) {
|
||||||
$pass_tokens['customer'] = $customer_token;
|
$pass_tokens['customer'] = $customer_token;
|
||||||
// Use the customer token only, since we already saved the (one time use) card token to the customer
|
// Use the customer token only, since we already saved the (one time use) card token to the customer
|
||||||
if ( isset( $_POST['wc-simplify_commerce-new-payment-method'] ) && true === (bool) $_POST['wc-simplify_commerce-new-payment-method'] ) {
|
if ( isset( $_POST['wc-simplify_commerce-new-payment-method'] ) && true === (bool) $_POST['wc-simplify_commerce-new-payment-method'] ) {
|
||||||
|
@ -441,7 +441,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway_CC {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Did we create an account and save a payment method? We might need to use the customer token instead of the card token
|
// Did we create an account and save a payment method? We might need to use the customer token instead of the card token
|
||||||
if ( isset( $_POST['createaccount'] ) && true === (bool) $_POST['createaccount'] && empty ( $customer_token ) ) {
|
if ( isset( $_POST['createaccount'] ) && true === (bool) $_POST['createaccount'] && empty( $customer_token ) ) {
|
||||||
$user_token = $this->get_users_token();
|
$user_token = $this->get_users_token();
|
||||||
if ( ! is_null( $user_token ) ) {
|
if ( ! is_null( $user_token ) ) {
|
||||||
$pass_tokens['customer'] = $user_token->get_token();
|
$pass_tokens['customer'] = $user_token->get_token();
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket" />
|
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket" />
|
||||||
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" />
|
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" />
|
||||||
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket" />
|
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket" />
|
||||||
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket" />
|
<!-- <exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket" /> -->
|
||||||
<!-- <exclude name="Squiz.Commenting.BlockComment.NoEmptyLineBefore" /> -->
|
<!-- <exclude name="Squiz.Commenting.BlockComment.NoEmptyLineBefore" /> -->
|
||||||
<!-- <exclude name="Squiz.Commenting.BlockComment.NoNewLine" /> -->
|
<!-- <exclude name="Squiz.Commenting.BlockComment.NoNewLine" /> -->
|
||||||
<exclude name="Squiz.Commenting.BlockComment.WrongEnd" />
|
<exclude name="Squiz.Commenting.BlockComment.WrongEnd" />
|
||||||
|
|
|
@ -47,7 +47,7 @@ do_action( 'woocommerce_before_account_payment_methods', $has_methods ); ?>
|
||||||
if ( has_action( 'woocommerce_account_payment_methods_column_' . $column_id ) ) {
|
if ( has_action( 'woocommerce_account_payment_methods_column_' . $column_id ) ) {
|
||||||
do_action( 'woocommerce_account_payment_methods_column_' . $column_id, $method );
|
do_action( 'woocommerce_account_payment_methods_column_' . $column_id, $method );
|
||||||
} elseif ( 'method' === $column_id ) {
|
} elseif ( 'method' === $column_id ) {
|
||||||
if ( ! empty ( $method['method']['last4'] ) ) {
|
if ( ! empty( $method['method']['last4'] ) ) {
|
||||||
echo sprintf( __( '%1$s ending in %2$s', 'woocommerce' ), esc_html( wc_get_credit_card_type_label( $method['method']['brand'] ) ), esc_html( $method['method']['last4'] ) );
|
echo sprintf( __( '%1$s ending in %2$s', 'woocommerce' ), esc_html( wc_get_credit_card_type_label( $method['method']['brand'] ) ), esc_html( $method['method']['last4'] ) );
|
||||||
} else {
|
} else {
|
||||||
echo esc_html( wc_get_credit_card_type_label( $method['method']['brand'] ) );
|
echo esc_html( wc_get_credit_card_type_label( $method['method']['brand'] ) );
|
||||||
|
|
|
@ -65,7 +65,7 @@ do_action( 'woocommerce_before_add_to_cart_form' ); ?>
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<?php do_action ( 'woocommerce_grouped_product_list_before_price', $product ); ?>
|
<?php do_action( 'woocommerce_grouped_product_list_before_price', $product ); ?>
|
||||||
|
|
||||||
<td class="price">
|
<td class="price">
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue