Skip to content

Commit 35f7ecc

Browse files
author
xecdev
committed
Use apiBaseUrl for JS
1 parent 6fb8702 commit 35f7ecc

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

assets/js/paybutton-paywall-cashtab-login.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function renderLoginPaybutton() {
9090
successText: 'Login Successful!',
9191
autoClose: true,
9292
opReturn: 'login',
93-
'api-base-url': PaywallAjax.apiBaseUrl,
93+
apiBaseUrl: PaywallAjax.apiBaseUrl,
9494
onSuccess: function (tx) {
9595
paymentInitiated = true;
9696
loginAddr = tx?.inputAddresses?.[0] ?? null;

assets/js/paywalled-content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jQuery(document).ready(function($) {
125125
theme: configData.theme,
126126
opReturn: configData.opReturn, // carries postID
127127
autoClose: configData.autoClose,
128-
'api-base-url': configData['api-base-url'],
128+
apiBaseUrl: configData.apiBaseUrl,
129129

130130
onSuccess: function (tx) {
131131
paymentInitiated = true;

includes/class-paybutton-public.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public function paybutton_paywall_shortcode( $atts, $content = null ) {
239239
),
240240
'opReturn' => (string) $post_id, //This is a hack to give the PB server the post ID to send it back to WP's DB
241241
'autoClose' => true,
242-
'api-base-url' => get_option( 'paybutton_api_base_url', 'https://paybutton.org' )
242+
'apiBaseUrl' => get_option( 'paybutton_api_base_url', 'https://paybutton.org' )
243243
);
244244

245245
//NEW: If the admin enabled “Show Unlock Count on Front‐end,” and this post is NOT yet unlocked then display unlock count on the front end.

includes/woocommerce/class-wc-gateway-paybutton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public function thankyou_page( $order_id ) {
183183
'successText' => 'Payment Received! Processing...',
184184
'autoClose' => true,
185185
'size' => 'xl',
186-
'api-base-url' => get_option( 'paybutton_api_base_url', 'https://paybutton.org' )
186+
'apiBaseUrl' => get_option( 'paybutton_api_base_url', 'https://paybutton.org' ),
187187
);
188188

189189
echo '<h2>Complete your payment</h2>';

0 commit comments

Comments
 (0)