mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge branch 'trunk' into PCP-176-currency-japananese-yen-jpy-is-n
This commit is contained in:
commit
4adccbdba3
7 changed files with 39 additions and 6 deletions
|
@ -202,7 +202,7 @@ class SmartButton implements SmartButtonInterface {
|
|||
add_filter(
|
||||
'woocommerce_credit_card_form_fields',
|
||||
function ( $default_fields, $id ) {
|
||||
if ( $this->settings->has( 'vault_enabled' ) && $this->settings->get( 'vault_enabled' ) && CreditCardGateway::ID === $id ) {
|
||||
if ( is_user_logged_in() && $this->settings->has( 'vault_enabled' ) && $this->settings->get( 'vault_enabled' ) && CreditCardGateway::ID === $id ) {
|
||||
$default_fields['card-vault'] = sprintf(
|
||||
'<p class="form-row form-row-wide"><label for="vault"><input class="ppcp-credit-card-vault" type="checkbox" id="ppcp-credit-card-vault" name="vault">%s</label></p>',
|
||||
esc_html__( 'Save your Credit Card', 'woocommerce-paypal-payments' )
|
||||
|
|
|
@ -174,7 +174,7 @@ class CreateOrderEndpoint implements EndpointInterface {
|
|||
$this->set_bn_code( $data );
|
||||
|
||||
if ( 'checkout' === $data['context'] ) {
|
||||
if ( '1' === $data['createaccount'] ) {
|
||||
if ( isset( $data['createaccount'] ) && '1' === $data['createaccount'] ) {
|
||||
$this->process_checkout_form_when_creating_account( $data['form'], $wc_order );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue