mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix the phpcs
This commit is contained in:
parent
156acbf32c
commit
c9b15c0f76
3 changed files with 23 additions and 23 deletions
|
@ -232,7 +232,7 @@ return function ( ContainerInterface $container, array $fields ): array {
|
|||
'gateway' => Settings::PAY_LATER_TAB_ID,
|
||||
),
|
||||
|
||||
// Single product
|
||||
// Single product.
|
||||
'pay_later_product_messaging_heading' => array(
|
||||
'heading' => __( 'Pay Later Messaging on Single Product', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-heading',
|
||||
|
@ -356,7 +356,7 @@ return function ( ContainerInterface $container, array $fields ): array {
|
|||
'gateway' => Settings::PAY_LATER_TAB_ID,
|
||||
),
|
||||
|
||||
// Cart
|
||||
// Cart.
|
||||
'pay_later_cart_messaging_heading' => array(
|
||||
'heading' => __( 'Pay Later Messaging on Cart', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-heading',
|
||||
|
@ -480,7 +480,7 @@ return function ( ContainerInterface $container, array $fields ): array {
|
|||
'gateway' => Settings::PAY_LATER_TAB_ID,
|
||||
),
|
||||
|
||||
// Checkout
|
||||
// Checkout.
|
||||
'pay_later_checkout_messaging_heading' => array(
|
||||
'heading' => __( 'Pay Later Messaging on Checkout', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-heading',
|
||||
|
|
|
@ -988,15 +988,15 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_product_preview' => array(
|
||||
'type' => 'ppcp-text',
|
||||
'text' => $render_preview_element( 'ppcpProductButtonPreview' ),
|
||||
'screens' => array(
|
||||
State::STATE_ONBOARDED,
|
||||
),
|
||||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_product_preview' => array(
|
||||
'type' => 'ppcp-text',
|
||||
'text' => $render_preview_element( 'ppcpProductButtonPreview' ),
|
||||
'screens' => array(
|
||||
State::STATE_ONBOARDED,
|
||||
),
|
||||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
|
||||
// Cart settings.
|
||||
'button_cart_heading' => array(
|
||||
|
@ -1139,15 +1139,15 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_cart_preview' => array(
|
||||
'type' => 'ppcp-text',
|
||||
'text' => $render_preview_element( 'ppcpCartButtonPreview' ),
|
||||
'screens' => array(
|
||||
State::STATE_ONBOARDED,
|
||||
),
|
||||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_cart_preview' => array(
|
||||
'type' => 'ppcp-text',
|
||||
'text' => $render_preview_element( 'ppcpCartButtonPreview' ),
|
||||
'screens' => array(
|
||||
State::STATE_ONBOARDED,
|
||||
),
|
||||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
|
||||
// Mini cart settings.
|
||||
'button_mini-cart_heading' => array(
|
||||
|
|
|
@ -74,8 +74,8 @@ class SettingsStatus {
|
|||
* @throws NotFoundException When a setting was not found.
|
||||
*/
|
||||
public function is_pay_later_button_enabled(): bool {
|
||||
$pay_later_button_enabled = $this->settings->has( 'pay_later_button_enabled' ) && $this->settings->get( 'pay_later_button_enabled' );
|
||||
$selected_locations = $this->settings->has( 'pay_later_button_locations' ) ? $this->settings->get( 'pay_later_button_locations' ) : array();
|
||||
$pay_later_button_enabled = $this->settings->has( 'pay_later_button_enabled' ) && $this->settings->get( 'pay_later_button_enabled' );
|
||||
$selected_locations = $this->settings->has( 'pay_later_button_locations' ) ? $this->settings->get( 'pay_later_button_locations' ) : array();
|
||||
|
||||
return $pay_later_button_enabled && ! empty( $selected_locations );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue