Skip to content

Commit

Permalink
Fix: the "Offline donations" section in the controls of the Payment G…
Browse files Browse the repository at this point in the history
…ateways block should be visible when Offline gateway for v3 forms is enabled (#7492)
  • Loading branch information
glaubersilva authored Aug 31, 2024
1 parent abec9a7 commit 3fb43fb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class EnqueueOfflineFormBuilderScripts
/**
* Enqueues the Stripe scripts and styles for the Form Builder.
*
* @unreleased On the "offlineEnabled" option check if the offline gateway is enabled for v3 forms instead of v2 forms
*
* @return void
*/
public function __invoke()
Expand All @@ -34,7 +36,7 @@ public function __invoke()
'givewp-offline-gateway-form-builder',
'window.giveOfflineGatewaySettings = ' . wp_json_encode(
[
'offlineEnabled' => give_is_gateway_active(OfflineGateway::id()),
'offlineEnabled' => give_is_gateway_active(OfflineGateway::id(), 3),
'offlineSettingsUrl' => admin_url(
'edit.php?post_type=give_forms&page=give-settings&tab=gateways&section=offline-donations'
),
Expand Down

0 comments on commit 3fb43fb

Please sign in to comment.