Skip to content

Commit

Permalink
search for save payment method checkbox dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Karimov authored and Timur Karimov committed Nov 25, 2024
1 parent 5f0a5e5 commit a77ae2e
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 2 deletions.
84 changes: 83 additions & 1 deletion assets/css/admin.rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,93 @@
padding-top: 2px;
}

/* WCPay Fraud Risk Level meta box */
.wcpay-fraud-risk-level {
border-bottom: 1px solid #ddd;
padding: 8px 12px;
}

.wcpay-fraud-risk-level > p {
margin: 0;
}

.wcpay-fraud-risk-level__title {
font-weight: 600;
}

.wcpay-fraud-risk-level__bar {
display: grid;
gap: 4px;
grid-template-columns: 50% auto;
margin: 6px 0 8px;
}

.wcpay-fraud-risk-level__bar::after,
.wcpay-fraud-risk-level__bar::before {
background-color: #bbb;
content: '';
border-radius: 4px;
height: 4px;
}

.wcpay-fraud-risk-level--normal .wcpay-fraud-risk-level__title {
color: #008a20;
}

.wcpay-fraud-risk-level--normal .wcpay-fraud-risk-level__bar {
grid-template-columns: 15% auto;
}

.wcpay-fraud-risk-level--normal .wcpay-fraud-risk-level__bar::before {
background-color: #008a20;
}

.wcpay-fraud-risk-level--elevated .wcpay-fraud-risk-level__title {
color: #b16202;
}

.wcpay-fraud-risk-level--elevated .wcpay-fraud-risk-level__bar {
grid-template-columns: 60% auto;
}

.wcpay-fraud-risk-level--elevated .wcpay-fraud-risk-level__bar::before {
background-color: #b16202;
}

.wcpay-fraud-risk-level--highest .wcpay-fraud-risk-level__bar::before {
background-color: #b32d2e;
}

.wcpay-fraud-risk-level--highest .wcpay-fraud-risk-level__bar {
grid-template-columns: 100% auto;
}

.wcpay-fraud-risk-level--highest .wcpay-fraud-risk-level__bar::before {
background-color: #b32d2e;
}

/* WCPay Fraud Risk Action meta box */
#wcpay-order-fraud-and-risk-meta-box div.inside {
margin-top: 0;
padding: 0;
}

.wcpay-fraud-risk-action {
padding: 8px 12px 12px;
}

.wcpay-fraud-risk-action > p {
margin: 0 0 6px;
}

.wcpay-fraud-risk-action > p:last-child {
margin-bottom: 0;
}

.wcpay-fraud-risk-meta-allow,
.wcpay-fraud-risk-meta-review,
.wcpay-fraud-risk-meta-blocked {
font-weight: 600;
font-size: 14px;
}

.wcpay-fraud-risk-meta-allow img {
Expand Down
4 changes: 4 additions & 0 deletions assets/css/success.rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@
.wc-payment-gateway-method-logo-wrapper.wc-payment-lpm-logo img {
max-height: 26px;
}

.wc-payment-gateway-method-logo-wrapper.wc-payment-card-logo img {
max-height: 1em;
}
2 changes: 1 addition & 1 deletion client/checkout/utils/upe.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function shouldIncludeTerms( paymentMethodType ) {
}

const savePaymentMethodCheckbox = paymentsForm.querySelector(
'#wc-woocommerce_payments-new-payment-method'
`#wc-${ paymentsForm.dataset.gatewayId }-new-payment-method`
);

return savePaymentMethodCheckbox?.checked || false;
Expand Down

0 comments on commit a77ae2e

Please sign in to comment.