Fix wpml compatibility issue#2290
Conversation
WalkthroughThis pull request introduces a static method Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
classes/controllers/FrmFormActionsController.php (1)
699-700: Replace version placeholderThe
@since x.xin the docblock should be replaced with the actual version number for this release.- * @since x.x + * @since 6.x
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
classes/controllers/FrmFormActionsController.php(1 hunks)classes/controllers/FrmHooksController.php(1 hunks)
🧰 Additional context used
🪛 GitHub Check: Psalm
classes/controllers/FrmHooksController.php
[failure] 75-75: UndefinedMethod
classes/controllers/FrmHooksController.php:75:51: UndefinedMethod: Method FrmFormActionsController::prevent_wpml_translations does not exist (see https://psalm.dev/022)
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: PHP 8 tests in WP trunk
- GitHub Check: Cypress
- GitHub Check: PHP 7.4 tests in WP trunk
- GitHub Check: Run PHP Syntax inspection (8.3)
- GitHub Check: PHP 8 tests in WP trunk
- GitHub Check: PHP 7.4 tests in WP trunk
- GitHub Check: Cypress
🔇 Additional comments (1)
classes/controllers/FrmFormActionsController.php (1)
706-711: Function logic is correctThe implementation correctly bypasses WPML's translation functionality for the 'frm_form_actions' post type by returning false. This will prevent WPML from filtering form actions based on the active language, which aligns with the PR objective.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
classes/controllers/FrmFormActionsController.php (1)
671-671: Update version placeholder in @SInCE tagThe
@sincetag contains a placeholder value "x.x" instead of an actual version number. This should be updated to reflect the correct version where this feature is being introduced.- * @since x.x + * @since 6.0Note: Replace "6.0" with the actual version number where this feature is being introduced.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
classes/controllers/FrmFormActionsController.php(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: PHP 8 tests in WP trunk
- GitHub Check: Cypress
- GitHub Check: PHP 7.4 tests in WP trunk
🔇 Additional comments (1)
classes/controllers/FrmFormActionsController.php (1)
667-682: Good implementation of WPML compatibility fixThe method correctly prevents WPML from filtering form actions based on the active language by returning false when the post type is 'frm_form_actions'. This addresses the compatibility issue mentioned in the PR title.
Related ticket https://secure.helpscout.net/conversation/2885530761/225900
Pre-release
formidable-6.19.1b.zip
This update helps to prevent WPML from filtering our form actions, so they work as expected.