fix(client): prevent PayPal script loads in development (#38785)
This commit is contained in:
committed by
GitHub
parent
c0905959a0
commit
88b263fef8
@@ -76,10 +76,15 @@ export class PaypalButton extends Component {
|
||||
render() {
|
||||
const { duration, planId, amount } = this.state;
|
||||
const isSubscription = duration !== 'onetime';
|
||||
|
||||
if (!paypalClientId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<PayPalButtonScriptLoader
|
||||
amount={amount}
|
||||
clinetId={paypalClientId}
|
||||
clientId={paypalClientId}
|
||||
createOrder={(data, actions) => {
|
||||
return actions.order.create({
|
||||
purchase_units: [
|
||||
|
Reference in New Issue
Block a user