mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-03 08:37:53 +08:00
Fix the coding styles
This commit is contained in:
parent
c199ce1f8b
commit
0e3c550082
2 changed files with 2 additions and 5 deletions
|
@ -210,7 +210,6 @@ class PayPalPaymentMethod extends AbstractPaymentMethodType {
|
|||
*/
|
||||
public function get_payment_method_data() {
|
||||
$script_data = $this->smart_button()->script_data();
|
||||
$cart = WC()->cart;
|
||||
|
||||
if ( isset( $script_data['continuation'] ) ) {
|
||||
$url = add_query_arg( array( CancelController::NONCE => wp_create_nonce( CancelController::NONCE ) ), wc_get_checkout_url() );
|
||||
|
@ -255,7 +254,7 @@ class PayPalPaymentMethod extends AbstractPaymentMethodType {
|
|||
),
|
||||
),
|
||||
'scriptData' => $script_data,
|
||||
'needShipping' => $cart && $cart->needs_shipping(),
|
||||
'needShipping' => WC()->cart->needs_shipping(),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1094,8 +1094,6 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
|
|||
|
||||
$url_params = $this->url_params();
|
||||
|
||||
$cart = WC()->cart;
|
||||
|
||||
$this->request_data->enqueue_nonce_fix();
|
||||
$localize = array(
|
||||
'url' => add_query_arg( $url_params, 'https://www.paypal.com/sdk/js' ),
|
||||
|
@ -1297,7 +1295,7 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
|
|||
'is_logged' => is_user_logged_in(),
|
||||
),
|
||||
'should_handle_shipping_in_paypal' => $this->should_handle_shipping_in_paypal && ! $this->is_checkout(),
|
||||
'needShipping' => $cart && $cart->needs_shipping(),
|
||||
'needShipping' => WC()->cart->needs_shipping(),
|
||||
'vaultingEnabled' => $this->settings->has( 'vault_enabled' ) && $this->settings->get( 'vault_enabled' ),
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue