Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
400 commits
Select commit Hold shift + click to select a range
22cc98e
Add back mybank;
Crabcyborg Feb 6, 2026
a52c8dd
Merge branch 'master' into paypal
Crabcyborg Feb 6, 2026
dde6a1a
Work on vetting status for ACDC, use onCancel and button styling for …
Crabcyborg Feb 6, 2026
78f27ea
Merge branch 'master' into paypal
Crabcyborg Feb 16, 2026
cac80b2
Show the vetting status properly
Crabcyborg Feb 16, 2026
b1e1f92
Separate out the acdc vetting status
Crabcyborg Feb 16, 2026
3e9853f
Add locale to the JS SDK
Crabcyborg Feb 16, 2026
9aa1fd2
Pass the payment source data and send brand name with filter to API f…
Crabcyborg Feb 16, 2026
d4ab544
Drop button layout for now and use a filter instead, update client id…
Crabcyborg Feb 17, 2026
7035d9c
Be explicit when rendering pay later button
Crabcyborg Feb 17, 2026
74a58f6
Drop the button layout filter (will not work anymore)
Crabcyborg Feb 17, 2026
d8a5a79
Work on refunding, work on building the card field HTML conditionally
Crabcyborg Feb 17, 2026
c3b843c
Merge branch 'master' into paypal
Crabcyborg Feb 18, 2026
20a2529
Wrap refund message so it looks like updated message or error, use sh…
Crabcyborg Feb 18, 2026
5247e9b
Send payer data when creating order
Crabcyborg Feb 18, 2026
beeee8f
Use the proper amount value for pay later messaging and sync it
Crabcyborg Feb 18, 2026
f24748f
Show buyer details in thank you message
Crabcyborg Feb 19, 2026
fbbe8d4
Stop showing error if cards are not eligible, only show vetting statu…
Crabcyborg Feb 19, 2026
72fd1ac
Add 3D secure checks
Crabcyborg Feb 19, 2026
f676851
Add server side liability checks as well
Crabcyborg Feb 19, 2026
6c4b6a5
Hide the paypal button and OR text when a credit card field has a value
Crabcyborg Feb 19, 2026
e121a31
Try adding a layout setting to control checkout vs card
Crabcyborg Feb 19, 2026
c322ddb
Get gateway icons to toggle in sync with one another
Crabcyborg Feb 20, 2026
196d620
Merge branch 'master' into paypal
Crabcyborg Feb 24, 2026
0af2f88
Ignore some psalm errors in paypal views
Crabcyborg Feb 24, 2026
2365857
Remove psalm as new dependency
Crabcyborg Feb 24, 2026
086541a
Run php cs fixer
Crabcyborg Feb 24, 2026
f7761de
Run sniffs
Crabcyborg Feb 24, 2026
b9e5197
Fix some workflow issues
Crabcyborg Feb 24, 2026
87a6773
Fix some phpcs issues
Crabcyborg Feb 24, 2026
ac7b02a
Add some typo rule exceptions and run eslint fixer
Crabcyborg Feb 24, 2026
c6bdde5
Merge branch 'master' into paypal
Crabcyborg Feb 25, 2026
7f68479
Apply eslint fixer
Crabcyborg Feb 25, 2026
aba8e82
Working on subscriptions (JS)
Crabcyborg Feb 25, 2026
bfa4fb7
Use the payment source from the onApprove data (the order object does…
Crabcyborg Feb 25, 2026
7e0e860
Remove submit loading when there is a paypal error
Crabcyborg Feb 25, 2026
4ed0695
Fix issue with running var not getting updated for buttons
Crabcyborg Feb 25, 2026
7fb37a5
Use card if there is no payment source set
Crabcyborg Feb 25, 2026
1afae70
Support venmo
Crabcyborg Feb 25, 2026
6d14ec8
Working on Google Pay
Crabcyborg Feb 25, 2026
c847b04
Improve the google pay button styling
Crabcyborg Feb 25, 2026
952051b
Include the other payment method buttons in the paypal button contain…
Crabcyborg Feb 26, 2026
be52e5b
Add some styles to the google pay button to make it more consistent w…
Crabcyborg Feb 26, 2026
88313c2
Update text for layout setting name
Crabcyborg Feb 26, 2026
3a319d8
Update Collect a Payment action text
Crabcyborg Feb 26, 2026
21e890b
Update card field messaging to check for paypal and to mention the ne…
Crabcyborg Feb 26, 2026
f4d7390
Fix the pay later text in the thank you message
Crabcyborg Feb 26, 2026
63d25c7
Merge branch 'master' into paypal
Crabcyborg Feb 27, 2026
a2be037
Apply phpcbf changes
Crabcyborg Feb 27, 2026
0db8cfd
Add filter for liability error for better flexibility
Crabcyborg Feb 27, 2026
a693eae
Move liability check into a separate function
Crabcyborg Feb 27, 2026
1697110
Work on entry syncing after order capture
Crabcyborg Feb 27, 2026
8c82179
Add more validation for order amount and order status
Crabcyborg Feb 27, 2026
8297ee4
Fix issues with creating order failing when address is blank
Crabcyborg Feb 27, 2026
9e6a4aa
Remove some old code for supporting PayPal that is no longer required
Crabcyborg Feb 27, 2026
464cc18
Work on compatibility with paypal add-on
Crabcyborg Feb 27, 2026
3379590
Merge branch 'master' into paypal
Crabcyborg Mar 2, 2026
94eeb0c
Merge branch 'master' into paypal
Crabcyborg Mar 2, 2026
a00036e
Run php cs fixer
Crabcyborg Mar 2, 2026
cc2112d
Run eslint fix
Crabcyborg Mar 2, 2026
3cfe19c
Merge branch 'master' into paypal
Crabcyborg Mar 2, 2026
4b304f0
Add setting to insert new paypal fields
Crabcyborg Mar 2, 2026
b92d79a
Add todo comment
Crabcyborg Mar 2, 2026
a6d87d3
Flag and hide the paypal order fields
Crabcyborg Mar 2, 2026
ba573ee
Working on recurring payments
Crabcyborg Mar 3, 2026
1c8269a
Merge branch 'master' into paypal
Crabcyborg Mar 3, 2026
fa5fb6d
Working on adding a shipping preference setting
Crabcyborg Mar 4, 2026
adb0ae1
Merge branch 'master' into paypal
Crabcyborg Mar 4, 2026
bb6e02b
Pass the shipping_preference when creating an order
Crabcyborg Mar 4, 2026
74e137c
Pass brand name to create subscription
Crabcyborg Mar 4, 2026
fcf6c09
Stop including paypal legacy in payment actions when the add-on is no…
Crabcyborg Mar 4, 2026
5b208c0
Pass shipping preference when creating subscription, hook in to show …
Crabcyborg Mar 4, 2026
d618f1f
Improvements to how paypal legacy icon is added
Crabcyborg Mar 4, 2026
4c6d10e
Stop using the def class names for the lite payment actions, use the …
Crabcyborg Mar 4, 2026
d9d08e4
Clean up
Crabcyborg Mar 4, 2026
6c8429f
Put address field shipping preference option behind a pro check
Crabcyborg Mar 4, 2026
1a8a28f
Merge branch 'master' into paypal
Crabcyborg Mar 5, 2026
60f8a03
Fix eslint issues
Crabcyborg Mar 5, 2026
36c0572
Remove unused param (deepscan issue)
Crabcyborg Mar 5, 2026
fe82572
Apply rector fix
Crabcyborg Mar 5, 2026
7839e98
Remove param comment for removed param
Crabcyborg Mar 5, 2026
5449e31
Merge branch 'master' into paypal
Crabcyborg Mar 5, 2026
b099fde
Pass payer data when creating a subscription
Crabcyborg Mar 5, 2026
050c32e
Sync entry based on subscription response
Crabcyborg Mar 5, 2026
3bbb42a
Merge branch 'master' into paypal
Crabcyborg Mar 12, 2026
d08cbeb
Run php cs fixer
Crabcyborg Mar 12, 2026
e2c8b1c
Run phpcbf and clean up code
Crabcyborg Mar 12, 2026
dbcd198
Remove some testing code
Crabcyborg Mar 12, 2026
2b8e22c
Fix more workflow errors
Crabcyborg Mar 12, 2026
62a070f
Add missing param comment
Crabcyborg Mar 12, 2026
2186e99
Add more type comments
Crabcyborg Mar 12, 2026
c8dacb8
Remove unused function
Crabcyborg Mar 12, 2026
c7454a2
Load the paypal scripts asynchronously when there are page breaks in …
Crabcyborg Mar 12, 2026
f649d80
Merge branch 'master' into paypal
Crabcyborg Mar 12, 2026
743a39e
Conditionally include components based on layout setting and only loa…
Crabcyborg Mar 12, 2026
6b6d44e
Stop using a loop
Crabcyborg Mar 12, 2026
c9291c2
Use QA site
Crabcyborg Mar 12, 2026
be11130
Stop excluding the paypal folder
Crabcyborg Mar 12, 2026
67d1c72
Add new button style filter, make buttons smaller by default
Crabcyborg Mar 13, 2026
7578a91
Add more iframe height validation
Crabcyborg Mar 13, 2026
544a2d1
Extract out google pay height logic to a new function, adjust styling…
Crabcyborg Mar 13, 2026
822587d
Add 1px to height of iframe wrappers to avoid border cut off issue
Crabcyborg Mar 13, 2026
93e30f9
Merged master
Crabcyborg Mar 13, 2026
d6d0280
Merge branch 'master' into paypal
Crabcyborg Mar 13, 2026
f8a73b9
Include the paypal order field note
Crabcyborg Mar 13, 2026
dd6ad7f
Add new fields controller to move some functions over
Crabcyborg Mar 13, 2026
b3b5083
Merge branch 'master' into paypal
Crabcyborg Mar 13, 2026
1205022
Merge branch 'master' into paypal
Crabcyborg Mar 16, 2026
c620a8f
Prevent error when using gold with Venmo
Crabcyborg Mar 16, 2026
88cbfb7
Stop trying to use colors for funding source buttons if the source do…
Crabcyborg Mar 16, 2026
e992294
Merge branch 'master' into paypal
Crabcyborg Mar 18, 2026
e026af1
PayPal radio buttons implementation
Crabcyborg Mar 20, 2026
f442016
Merge branch 'master' into paypal
Crabcyborg Mar 20, 2026
0806e09
Remove the method descriptions object
Crabcyborg Mar 20, 2026
e9feedb
Use google pay icon locally
Crabcyborg Mar 20, 2026
9852bbe
Move CSS to a CSS file
Crabcyborg Mar 20, 2026
7b58e78
Apply eslint fix
Crabcyborg Mar 20, 2026
7a01741
Merge branch 'master' into paypal_radio_buttons
Crabcyborg Mar 20, 2026
fd032da
Apply eslint fixes
Crabcyborg Mar 20, 2026
5f76897
Merge pull request #3032 from Strategy11/paypal_radio_buttons
Crabcyborg Mar 20, 2026
258a0e4
Merge branch 'master' into paypal
Crabcyborg Mar 23, 2026
202ef7e
Stop using .call
Crabcyborg Mar 23, 2026
66372a3
Remove unused function
Crabcyborg Mar 23, 2026
2a00116
Run php cs fixer
Crabcyborg Mar 23, 2026
64601f7
Move logic out into a new get source display type function, fix some …
Crabcyborg Mar 23, 2026
2151f10
Move format address logic into a new function
Crabcyborg Mar 23, 2026
fa551cb
Get refunding working when the payments submodule is active
Crabcyborg Mar 23, 2026
3a3f70d
Make gateway buttons easier to render from other add-ons
Crabcyborg Mar 23, 2026
094dad9
Use Stripe, Square, PayPal as gateway button order
Crabcyborg Mar 24, 2026
6e1b724
Merge branch 'master' into paypal
Crabcyborg Mar 24, 2026
0d8dbcc
Support subscriptions for card fields
Crabcyborg Mar 24, 2026
bc7ff90
Conditionally show and hide the paypal button settings based on card/…
Crabcyborg Mar 24, 2026
3bc9b83
Try to add in links to PayPal for onboarding errors
Crabcyborg Mar 25, 2026
304ca19
Merge branch 'master' into paypal
Crabcyborg Mar 26, 2026
c10c5ea
Apply some workflow fixes
Crabcyborg Mar 26, 2026
6c38a61
Apply some eslint fixes
Crabcyborg Mar 26, 2026
9a6a893
Add return description
Crabcyborg Mar 26, 2026
c1b60ed
Fix issues with layout setting
Crabcyborg Mar 26, 2026
069da46
Working on Apple Pay (wip)
Crabcyborg Mar 30, 2026
30e279c
Get apple pay button appearing
Crabcyborg Mar 30, 2026
3039bcc
Remove some logging
Crabcyborg Mar 30, 2026
36b9640
Drop unused var
Crabcyborg Mar 30, 2026
bf25dc1
Merge pull request #3050 from Strategy11/apple_pay
Crabcyborg Mar 30, 2026
0d344cb
Merge branch 'master' into paypal
Crabcyborg Mar 30, 2026
1267097
Drop inject styles function
Crabcyborg Mar 30, 2026
827f360
Include pricing data when creating order
Crabcyborg Mar 31, 2026
294d286
Merge branch 'master' into paypal
Crabcyborg Mar 31, 2026
5fbd6ed
Improve Apple Pay button styling
Crabcyborg Mar 31, 2026
c59663d
Merge branch 'master' into paypal
Crabcyborg Mar 31, 2026
0fd4b9e
Add event handling (not tested yet)
Crabcyborg Mar 31, 2026
9128c09
Use .append
Crabcyborg Mar 31, 2026
c228a7e
Run php cs fixer
Crabcyborg Mar 31, 2026
c8c9f99
Working on webhooks (refunds working)
Crabcyborg Apr 1, 2026
270de89
Remove some logging
Crabcyborg Apr 1, 2026
e375a1c
Actually use product name setting for product name when creating subs…
Crabcyborg Apr 1, 2026
ac17153
Working on handling cancelled subscription events
Crabcyborg Apr 2, 2026
35d3548
Work on adding the first payment row for subscriptions
Crabcyborg Apr 2, 2026
20ad8ec
Process shortcodes for product name
Crabcyborg Apr 2, 2026
e6ac1f8
Merge branch 'master' into paypal
Crabcyborg Apr 2, 2026
b238afa
Add PayPal to gateway checks for pricing fields
Crabcyborg Apr 2, 2026
a17c064
Remove old todo comment
Crabcyborg Apr 2, 2026
a5b01db
Run eslint fix
Crabcyborg Apr 2, 2026
deedbad
Run rector process and php cs fixer
Crabcyborg Apr 2, 2026
cd41741
Run phpcbf, only include Apple Pay SDK as a dependency when buttons i…
Crabcyborg Apr 2, 2026
9aee2ad
Fix indentation
Crabcyborg Apr 2, 2026
e1ba1c7
Merge branch 'master' into paypal
Crabcyborg Apr 2, 2026
06cecba
Run php cs fixer, add check for type when filtering brand name
Crabcyborg Apr 2, 2026
5735f5e
Update how the product name setting is added so it works consistently…
Crabcyborg Apr 2, 2026
7cd9a12
Remove references to location id (carried from Square logic)
Crabcyborg Apr 2, 2026
d4970c8
Use $action_control instead of $this, add nullable check for product …
Crabcyborg Apr 2, 2026
23bc794
Merge branch 'master' into paypal
Crabcyborg Apr 6, 2026
cb7513c
Put back php open tag
Crabcyborg Apr 6, 2026
2baf23d
Remove whitespace change
Crabcyborg Apr 6, 2026
7810466
Merge branch 'master' into paypal
Crabcyborg Apr 6, 2026
23da8b6
Remove unused email param (included instead with payer)
Crabcyborg Apr 6, 2026
00059ef
Add product type setting, move payment type setting up and move curre…
Crabcyborg Apr 6, 2026
2e3b32b
Add recurring payment settings
Crabcyborg Apr 6, 2026
f7fbd3d
Workign on alternative UI for paypal
Crabcyborg Apr 6, 2026
998aa5f
Merge pull request #3063 from Strategy11/paypal_alternative_ui
Crabcyborg Apr 6, 2026
c5db8ae
Merge branch 'master' into paypal
Crabcyborg Apr 6, 2026
95a3f98
Merge branch 'paypal' of https://github.com/Strategy11/formidable-for…
Crabcyborg Apr 6, 2026
82d59f7
Update settings hooks to be consistent with Stripe add-on
Crabcyborg Apr 7, 2026
cd25c32
Add required asterisk and warning when product name is empty
Crabcyborg Apr 7, 2026
de450a4
Add recurring type check as well before showing warning
Crabcyborg Apr 7, 2026
f235ea4
Show warnings if amount is not set and add a required asterisk, add w…
Crabcyborg Apr 7, 2026
ef08eb5
Merge branch 'master' into paypal
Crabcyborg Apr 16, 2026
4ba6fae
Merge branch 'master' into paypal
Crabcyborg Apr 22, 2026
8dcd9e8
Fix incorrect type
Crabcyborg Apr 22, 2026
abfad6a
Fix bug with methchant ID appearing as N/A in error messages
Crabcyborg Apr 22, 2026
2421583
Only show the JS error message instead of the whole JSON
Crabcyborg Apr 23, 2026
9e6863d
Show the error message when creating/capturing order fails
Crabcyborg Apr 23, 2026
69d2ccf
Translate the fallback
Crabcyborg Apr 23, 2026
98798fd
Remove unnecessary checks for $headers since it is never empty
Crabcyborg Apr 23, 2026
e31579f
Show option to reconnect when oauth integrations is empty
Crabcyborg Apr 23, 2026
9ee41fc
Remove unused API endpoint
Crabcyborg Apr 27, 2026
d176d03
Add meta more consistently
Crabcyborg Apr 27, 2026
432f350
Include shipping info in paypal order data
Crabcyborg Apr 28, 2026
722b644
Always use the production BN code
Crabcyborg Apr 29, 2026
a949396
Add logic for pending payments
Crabcyborg Apr 29, 2026
c531a97
Log PayPal debug IDs
Crabcyborg Apr 30, 2026
f85b34a
Merge branch 'paypal' into forms_actions_refresh_plus_paypal
Crabcyborg Apr 30, 2026
3db1ea2
Fix possible issue with apple pay using $0 amount
Crabcyborg Apr 30, 2026
6452b07
Add check for connection before making request to create order
Crabcyborg May 1, 2026
47ce24e
Working on improving error handling
Crabcyborg May 1, 2026
5c3d8a1
Working on displaying debug IDs for errors, prevent layout setting co…
Crabcyborg May 4, 2026
e5beaaf
Error handling tweaks
Crabcyborg May 7, 2026
45fa9f2
Merge branch 'paypal' into forms_actions_refresh_plus_paypal
Crabcyborg May 7, 2026
f1fd5e2
Merge branch 'master' into forms_actions_refresh_plus_paypal
Crabcyborg May 7, 2026
28ba254
Merge branch 'rock/form-actions-refresh' into forms_actions_refresh_p…
Crabcyborg May 7, 2026
a560016
Add more error handling logic
Crabcyborg May 7, 2026
5f96b84
Fix mago issues
Crabcyborg May 7, 2026
2eefb12
Fix mago issues
Crabcyborg May 7, 2026
66e762a
Improvements to how debug IDs with with refunds
Crabcyborg May 7, 2026
af1bd56
Improve error handling
Crabcyborg May 7, 2026
b240c27
Improve failed capture error handling
Crabcyborg May 7, 2026
95eb4c4
Add form action descriptions for Stripe/Square actions
Crabcyborg May 8, 2026
541da16
Remove frm-inverse from all icons
Crabcyborg May 8, 2026
3793554
Reorganize form actions categories
Crabcyborg May 8, 2026
2db289c
Include custom actions in Misc
Crabcyborg May 8, 2026
f2509c6
Stop using commas as thousand separator
Crabcyborg May 15, 2026
3d3f02b
Merge branch 'master' into forms_actions_refresh_plus_paypal
Crabcyborg May 21, 2026
a0a01a0
Add additional validation for amount values
Crabcyborg May 21, 2026
50922d9
Run php cs fixer
Crabcyborg May 21, 2026
c78193a
Run rector fix
Crabcyborg May 21, 2026
7995eb1
Run phpcbf
Crabcyborg May 21, 2026
2e0aa56
Run php cs fixer
Crabcyborg May 21, 2026
8376bd9
Run eslint fix
Crabcyborg May 21, 2026
ddb15ad
Fix phpcs issues
Crabcyborg May 21, 2026
a7b8c8a
Merge branch 'forms_actions_refresh_plus_paypal' into reorganize_form…
Crabcyborg May 21, 2026
6b49d69
Run php cs fixer
Crabcyborg May 21, 2026
78693f8
Merge pull request #3097 from Strategy11/reorganize_form_action_categ…
Crabcyborg May 21, 2026
e6e918d
Run phpcbf
Crabcyborg May 21, 2026
b29784c
Merge branch 'master' into forms_actions_refresh_plus_paypal
Crabcyborg May 25, 2026
d78f128
Use Current Actions, not Your Actions
Crabcyborg May 25, 2026
f71ffdc
Pass the correct mode to get seller status requests
Crabcyborg May 25, 2026
1c41421
Fix and ignore some psalm issues
Crabcyborg May 25, 2026
f100ed0
Ignore long line (phpcs)
Crabcyborg May 25, 2026
0100114
Fix linting issues
Crabcyborg May 25, 2026
088aa7a
Run fixers
Crabcyborg May 25, 2026
f17296a
Use floatval
Crabcyborg May 25, 2026
f332c42
Ignore some phpstan issues
Crabcyborg May 25, 2026
afb97a8
Ignore some phpstan issues
Crabcyborg May 25, 2026
43dfa81
Fix typo, get phpstan passing (ignore errors for now)
Crabcyborg May 25, 2026
b938db5
Drop unused function
Crabcyborg May 25, 2026
54ef6b4
Use paypal layout to avoid conflicts with Stripe
Crabcyborg May 25, 2026
c7e6436
Add ssl checks before including google pay and apple pay, and add a f…
Crabcyborg May 25, 2026
36f1266
Add comment to filter
Crabcyborg May 25, 2026
2263446
Run fixers
Crabcyborg May 25, 2026
d82b995
Ignore some phpcs issues
Crabcyborg May 25, 2026
572481d
Ignore long line
Crabcyborg May 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ Ags = "Ags"
unmergable = "unmergable"
# This is detected in our Stripe publishable key.
iz = "iz"
# `BA` is the ISO country code for Bosnia and Herzegovina in PayPal country lists.
BA = "BA"
# `PN` is the ISO country code for Pitcairn Islands in PayPal country lists.
PN = "PN"
# `Ot` is a substring in a PayPal sandbox token.
Ot = "Ot"
# This is used in a Sniff to reference a PHP function that does exist.
writeable = "writeable"

Expand Down
3 changes: 1 addition & 2 deletions bin/zip-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ zip -r $zipname $destination \
-x "*/eslint-rules/*" \
-x "*/phpcs-sniffs/*" \
-x "$source/venv/*" \
-x "formidable/resources/*" \
-x "formidable/paypal/*"
-x "formidable/resources/*"

if [ ! -z "$3" ]; then
rm -rf $destination
Expand Down
153 changes: 131 additions & 22 deletions classes/controllers/FrmFormActionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FrmFormActionsController {
public static $action_post_type = 'frm_form_actions';

/**
* @var array|null
* @var Frm_Form_Action_Factory|null
*/
public static $registered_actions;

Expand Down Expand Up @@ -57,10 +57,13 @@ public static function register_actions() {
'email' => 'FrmEmailAction',
'wppost' => 'FrmDefPostAction',
'register' => 'FrmDefRegAction',
'stripe' => 'FrmStripeLiteAction',
'square' => 'FrmSquareAction',
'paypal' => 'FrmPayPalLiteAction',
'paypal-legacy' => 'FrmDefPayPalLegacyAction',
'payment' => 'FrmTransLiteAction',
'quiz' => 'FrmDefQuizAction',
'quiz_outcome' => 'FrmDefQuizOutcomeAction',
'paypal' => 'FrmDefPayPalAction',
'payment' => 'FrmTransLiteAction',
'api' => 'FrmDefApiAction',
'mailchimp' => 'FrmDefMlcmpAction',
'activecampaign' => 'FrmDefActiveCampaignAction',
Expand All @@ -84,6 +87,11 @@ public static function register_actions() {
include_once FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/email_action.php';
include_once FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/default_actions.php';

// This needs to be called after we include default_actions.php or FrmDefPayPalLegacyAction will never exist.
if ( 'FrmPayPalLiteAction' === $action_classes['paypal'] || ! class_exists( 'FrmPaymentAction' ) || ! class_exists( 'FrmDefPayPalLegacyAction' ) ) {
unset( $action_classes['paypal-legacy'] );
}
Comment on lines +91 to +93

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Avoid direct access to filtered paypal key.

Line 91 assumes paypal exists in $action_classes; that key is filterable and may be removed, causing an undefined index notice.

Suggested fix
-		if ( 'FrmPayPalLiteAction' === $action_classes['paypal'] || ! class_exists( 'FrmPaymentAction' ) || ! class_exists( 'FrmDefPayPalLegacyAction' ) ) {
+		if ( 'FrmPayPalLiteAction' === ( $action_classes['paypal'] ?? '' ) || ! class_exists( 'FrmPaymentAction' ) || ! class_exists( 'FrmDefPayPalLegacyAction' ) ) {
 			unset( $action_classes['paypal-legacy'] );
 		}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@classes/controllers/FrmFormActionsController.php` around lines 91 - 93, The
code assumes $action_classes['paypal'] exists causing an undefined index notice;
update the conditional around FrmFormActionsController::... to first check
isset($action_classes['paypal']) (or array_key_exists) before comparing it to
'FrmPayPalLiteAction' and before using unset('paypal-legacy'), i.e. only
evaluate the 'paypal' comparison and call
unset($action_classes['paypal-legacy']) when the 'paypal' key is present,
preserving the existing checks against FrmPaymentAction and
FrmDefPayPalLegacyAction.


foreach ( $action_classes as $action_class ) {
self::$registered_actions->register( $action_class );
}
Expand All @@ -107,6 +115,8 @@ private static function apply_default_action_descriptions() {
'wppost' => __( 'Content publishing', 'formidable' ),
'register' => __( 'Account creation', 'formidable' ),
'payment' => __( 'Transaction alerts', 'formidable' ),
'stripe' => __( 'Payment gateway', 'formidable' ),
'square' => __( 'Payment gateway', 'formidable' ),
'paypal' => __( 'Payment gateway', 'formidable' ),
'quiz' => __( 'Automated grading', 'formidable' ),
'quiz_outcome' => __( 'Result logic', 'formidable' ),
Expand Down Expand Up @@ -182,6 +192,17 @@ private static function maybe_add_action_to_group( $action_controls, &$groups )
if ( isset( $group['actions'] ) ) {
$grouped = array_merge( $grouped, $group['actions'] );
}

// Also collect actions from sections
if ( ! isset( $group['sections'] ) ) {
continue;
}

foreach ( $group['sections'] as $section ) {
if ( isset( $section['actions'] ) ) {
$grouped = array_merge( $grouped, $section['actions'] );
}
}
}

foreach ( $action_controls as $action ) {
Expand Down Expand Up @@ -210,31 +231,48 @@ private static function maybe_add_action_to_group( $action_controls, &$groups )
* @return array
*/
public static function form_action_groups() {
// Get all action controls to check which are active
$action_controls = self::get_form_actions();

// Determine which actions are currently available
$available_actions = self::get_available_my_actions( $action_controls );

// Featured actions are add-ons that are NOT currently available
$all_addon_actions = array(
'api',
'register',
'n8n',
'quiz',
'quiz_outcome',
'googlespreadsheet',
);
$featured_actions = array_diff( $all_addon_actions, $available_actions );

$groups = array(
'misc' => array(
'name' => '',
'icon' => 'frmfont frm_shuffle_icon',
'actions' => array(
'on_submit',
'email',
'wppost',
'register',
'quiz',
'quiz_outcome',
'api',
'googlespreadsheet',
'n8n',
'my_actions' => array(
'name' => __( 'My Actions', 'formidable' ),
'icon' => 'frmfont frm_shuffle_icon',
'sections' => array(
'active' => array(
'name' => '',
'actions' => $available_actions,
),
'featured' => array(
'name' => __( 'Featured', 'formidable' ),
'actions' => array_values( $featured_actions ),
),
),
),
'payment' => array(
'payment' => array(
'name' => __( 'E-Commerce', 'formidable' ),
'icon' => 'frmfont frm_credit_card_alt_icon',
'actions' => array(
'paypal',
'payment',
'stripe',
'square',
),
),
'marketing' => array(
'marketing' => array(
'name' => __( 'Marketing', 'formidable' ),
'icon' => 'frmfont frm_mail_bulk_icon',
'actions' => array(
Expand All @@ -248,16 +286,88 @@ public static function form_action_groups() {
'twilio',
),
),
'crm' => array(
'crm' => array(
'name' => __( 'CRM', 'formidable' ),
'icon' => 'frmfont frm_address_card_icon',
'actions' => self::get_crm_actions(),
),
'misc' => array(
'name' => __( 'Misc', 'formidable' ),
'icon' => 'frmfont frm_shuffle_icon',
'actions' => self::get_misc_actions( $action_controls ),
),
);

return apply_filters( 'frm_action_groups', $groups );
}

/**
* Get the actions that are currently available (active) for My Actions section.
*
* @since x.x
*
* @param array $action_controls The registered action controls.
*
* @return array
*/
private static function get_available_my_actions( $action_controls ) {
$available = array(
'on_submit',
'email',
'stripe',
'square',
'paypal',
);

// Include all actions that are marked as active, including custom actions.
// This ensures custom actions appear in "My Actions" when enabled.
foreach ( $action_controls as $action_id => $action_control ) {
if ( ! in_array( $action_id, $available, true ) && ! empty( $action_control->action_options['active'] ) ) {
$available[] = $action_id;
}
}

return $available;
}

/**
* Get the actions to include in the Misc section.
*
* @since x.x
*
* @param array $action_controls The registered action controls.
*
* @return array
*/
private static function get_misc_actions( $action_controls ) {
$misc_actions = array(
'on_submit',
'email',
'wppost',
'register',
'api',
'n8n',
'quiz',
'quiz_outcome',
'googlespreadsheet',
);

// Include all active actions that aren't in specific groups (payment, marketing, crm).
// This ensures custom actions appear in "Misc" when enabled.
$payment_actions = array( 'paypal', 'stripe', 'square' );
$marketing_actions = array( 'mailchimp', 'activecampaign', 'constantcontact', 'getresponse', 'aweber', 'mailpoet', 'convertkit', 'twilio' );

$excluded_actions = array_merge( $payment_actions, $marketing_actions, self::get_crm_actions() );

foreach ( $action_controls as $action_id => $action_control ) {
if ( ! in_array( $action_id, $misc_actions, true ) && ! in_array( $action_id, $excluded_actions, true ) && ! empty( $action_control->action_options['active'] ) ) {
$misc_actions[] = $action_id;
}
}

return $misc_actions;
}

/**
* Get the actions to include in the CRM section.
*
Expand Down Expand Up @@ -524,6 +634,7 @@ public static function add_form_action() {
FrmAppHelper::permission_check( 'frm_edit_forms' );
check_ajax_referer( 'frm_ajax', 'nonce' );

$action_key = FrmAppHelper::get_param( 'list_id', '', 'post', 'absint' );
$action_type = FrmAppHelper::get_param( 'type', '', 'post', 'sanitize_text_field' );
$lite_actions = array_fill_keys( self::get_lite_actions(), true );

Expand All @@ -533,8 +644,6 @@ public static function add_form_action() {

global $frm_vars;

$action_key = FrmAppHelper::get_param( 'list_id', '', 'post', 'absint' );

/**
* @var FrmFormAction
*/
Expand Down
2 changes: 2 additions & 0 deletions classes/controllers/FrmHooksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public static function load_hooks() {
FrmTransLiteHooksController::load_hooks();
FrmStrpLiteHooksController::load_hooks();
FrmSquareLiteHooksController::load_hooks();
FrmPayPalLiteHooksController::load_hooks();

// GDPR
add_filter( 'frm_is_field_required', 'FrmFieldGdpr::force_required_field', 10, 2 );
Expand Down Expand Up @@ -219,6 +220,7 @@ public static function load_admin_hooks() {
FrmTransLiteHooksController::load_admin_hooks();
FrmStrpLiteHooksController::load_admin_hooks();
FrmSquareLiteHooksController::load_admin_hooks();
FrmPayPalLiteHooksController::load_admin_hooks();
FrmSMTPController::load_hooks();
FrmOnboardingWizardController::load_admin_hooks();
FrmAddonsController::load_admin_hooks();
Expand Down
5 changes: 4 additions & 1 deletion classes/helpers/FrmAppHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -3952,6 +3952,8 @@ public static function localize_script( $location ) {
/* translators: %d is the number of allowed actions per form */
'only_one_action' => sprintf( __( 'This form action is limited to %d per form.', 'formidable' ), 1 ),
'edit_action_text' => __( 'Please edit the existing form action.', 'formidable' ),
'only_one_payment_action' => __( 'This form already has a payment action, and is currently limited to a single payment action.', 'formidable' ),
'only_one_stripe_action' => __( 'This form already has a payment action. Multiple Stripe actions are available when using the Stripe add-on, available for Formidable Business licenses and higher.', 'formidable' ), // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
'unsafe_params' => FrmFormsHelper::reserved_words(),
/* Translators: %s is the name of a Detail Page Slug that is a reserved word.*/
'slug_is_reserved' => sprintf( __( 'The Detail Page Slug "%s" is reserved by WordPress. This may cause problems. Is this intentional?', 'formidable' ), '****' ), // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
Expand Down Expand Up @@ -4010,7 +4012,8 @@ private static function add_form_builder_modal_data( &$admin_script_strings ) {

$stripe_connected = FrmStrpLiteConnectHelper::at_least_one_mode_is_setup();
$square_connected = FrmSquareLiteConnectHelper::at_least_one_mode_is_setup();
$gateway_connected = $stripe_connected || $square_connected;
$paypal_connected = FrmPayPalLiteConnectHelper::at_least_one_mode_is_setup();
$gateway_connected = $stripe_connected || $square_connected || $paypal_connected;
$payments_settings_url = FrmStrpLiteAppController::get_payments_settings_url();

if ( ! $gateway_connected ) {
Expand Down
16 changes: 0 additions & 16 deletions classes/helpers/FrmTipsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,22 +238,6 @@ public static function get_form_action_tip() {
'tip' => __( 'Send leads to Mailchimp for instant email follow-up.', 'formidable' ),
'call' => self::cta_label(),
),
array(
'link' => array(
'content' => 'paypal-revenue',
'page' => 'paypal-increase-revenue-tip',
),
'tip' => __( 'Accept PayPal payments and grow your sales.', 'formidable' ),
'call' => self::cta_label(),
),
array(
'link' => array(
'content' => 'paypal-fast',
'page' => 'paypal-save-time-tip',
),
'tip' => __( 'Accept payments now with PayPal integration.', 'formidable' ),
'call' => self::cta_label(),
),
array(
'link' => array(
'content' => 'registration',
Expand Down
10 changes: 9 additions & 1 deletion classes/models/FrmFormAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,15 @@ public function __construct( $id_base, $name, $action_options = array(), $contro
die( 'You are not allowed to call this page directly.' );
}

$this->id_base = strtolower( $id_base );
$this->id_base = strtolower( $id_base );

/**
* @since x.x
*
* @param string $name
*/
$name = apply_filters( 'frm_' . $id_base . '_action_name', $name );

$this->name = $name;
$this->option_name = 'frm_' . $this->id_base . '_action';

Expand Down
9 changes: 8 additions & 1 deletion classes/models/fields/FrmFieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,14 @@ public function get_options( $values ) {
* @return void
*/
public function show_field( $args ) {
if ( apply_filters( 'frm_show_normal_field_type', $this->normal_field, $this->type ) ) {
/**
* @since x.x Added $field parameter.
*
* @param bool $show_normal_field_type
* @param string $type
* @param array $field
*/
if ( apply_filters( 'frm_show_normal_field_type', $this->normal_field, $this->type, $this->field ) ) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function apply_filters invoked with 4 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

echo $this->prepare_field_html( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} else {
do_action( 'frm_show_other_field_type', $this->field, $args['form'], array( 'action' => $args['form_action'] ) );
Expand Down
4 changes: 2 additions & 2 deletions classes/views/frm-fields/back-end/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
}

if ( $field['type'] === 'credit_card' && ! FrmAppHelper::pro_is_installed() ) {
if ( ! FrmStrpLiteConnectHelper::at_least_one_mode_is_setup() && ! FrmSquareLiteConnectHelper::at_least_one_mode_is_setup() ) {
if ( ! FrmStrpLiteConnectHelper::at_least_one_mode_is_setup() && ! FrmSquareLiteConnectHelper::at_least_one_mode_is_setup() && ! FrmPayPalLiteConnectHelper::at_least_one_mode_is_setup() ) {
FrmStrpLiteAppHelper::not_connected_warning();
} elseif ( ! FrmTransLiteActionsController::get_actions_for_form( $field['form_id'] ) ) {
?>
Expand All @@ -66,7 +66,7 @@
<span>
<?php
/* translators: %1$s: Link HTML, %2$s: End link */
printf( esc_html__( 'Credit Cards will not work without %1$sadding a Collect Payment action%2$s.', 'formidable' ), '<a href="?page=formidable&frm_action=settings&id=' . absint( $field['form_id'] ) . '&t=email_settings" target="_blank">', '</a>' );
printf( esc_html__( 'Credit Cards will not work without %1$sadding a Stripe, Square, or PayPal action%2$s.', 'formidable' ), '<a href="?page=formidable&frm_action=settings&id=' . absint( $field['form_id'] ) . '&t=email_settings" target="_blank">', '</a>' );
?>
</span>
</div>
Expand Down
14 changes: 13 additions & 1 deletion classes/views/frm-form-actions/_action_icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,24 @@
die( 'You are not allowed to call this page directly.' );
}

$limit = $action_control->action_options['limit'];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable $action_control might not be defined


A variable has been used but not defined, which may result in warnings during program execution. This can also cause bugs since the intended usage scope of the variable is not known.


if ( 'paypal' === $action_control->id_base ) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable $action_control might not be defined


A variable has been used but not defined, which may result in warnings during program execution. This can also cause bugs since the intended usage scope of the variable is not known.

// The PayPal add-on may overwrite this so change it back.
$limit = 1;
}

// Remove limit for Stripe action when Stripe add-on is active
if ( 'stripe' === $action_control->id_base && class_exists( 'FrmStrpAppHelper' ) ) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable $action_control might not be defined


A variable has been used but not defined, which may result in warnings during program execution. This can also cause bugs since the intended usage scope of the variable is not known.

$limit = 99;
}

$single_action_attrs = array_merge(
$data,
array(
'href' => 'javascript:void(0)',
'class' => $classes . ' button frm-button-secondary frm-button-sm frm-with-icon frm-ml-auto-force frm-fadein-down-short',
'data-limit' => $action_control->action_options['limit'],
'data-limit' => $limit,
'data-actiontype' => $action_control->id_base,
)
);
Expand Down
Loading
Loading