-
Notifications
You must be signed in to change notification settings - Fork 41
feat(upsell): enhance Go Pro tab with social proof and feature highlights #1151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Fixed the issue where the license key was not deactivating properly. - Removed unnecessary checks in the license key handling logic.
- Added support for Pro licenses in the license management system. - Introduced methods to check for active Pro licenses and retrieve Pro license keys and tiers. - Updated settings and templates to reflect Pro license status, improving user experience by providing relevant notices. - Adjusted license activation and deactivation logic to skip actions when a Pro license is active. - Enhanced data structures to include Pro license information in relevant fields. Testing confirmed: ✅ Pro license checks function correctly ✅ User notices display appropriately based on license status
- Changed the `replace_editor` action to a filter to ensure proper value return. - Updated the `replace_editor` method to return the original value when not handling specific post types. - Added entry to CHANGELOG.md for the fix related to the filter usage. Testing confirmed: ✅ Filter now correctly returns the value as expected.
- Renamed methods related to Pro license checks for consistency and clarity, changing `has_active_pro_license` to `has_pro_license`. - Updated references throughout the `License.php` class to reflect the new method names. - Adjusted comments for better understanding of the code's functionality. - Updated CHANGELOG.md to document the fix regarding license key display issues. Testing confirmed: ✅ License management functions correctly with updated method names.
Fixed a critical compatibility issue where the popup editor would fail to load when the block editor was enabled in Divi 4. The classic editor is now automatically enforced for Divi 4 users to resolve the conflict. Changes: - Updated Divi compatibility controller to force classic editor for Divi 4 (versions 4.0.0-4.99.99) - Hook at priority 999 to execute after Divi 4's block editor filter - Disable and auto-check the "Use Classic Editor" setting for Divi 4 users - Add visible warning explaining Divi 4 compatibility requirement - Updated changelog with user-friendly description Fixes the blank popup editor issue that only affects Divi 4 users with block editor enabled.
Adds native support for Newsletter plugin subscription forms: - PHP integration class extending PUM_Abstract_Integration_Form - JavaScript handler for AJAX form submission success events - Registered in core integrations array Follows modern integration pattern (FluentForms, WSForms, MC4WP)
Remove SUCCESS_PATTERNS matching - client-side validation means missing inputs are sufficient evidence of successful submission.
feat: Add Newsletter plugin form integration
…Newsletter plugin integration
- Added improvements to the CHANGELOG.md, highlighting the integration of AJAX submission for the Newsletter plugin. - Refactored block asset loading in the BlockEditor class to ensure block styles are only loaded when necessary, optimizing performance by leveraging WordPress's automatic loading mechanism for block styles.
Configure CodeRabbit to auto-review PRs targeting develop branch. Since develop is automatically merged to master during releases, we need PR reviews before merging to develop.
All PRs target develop; master is updated via automated release merges.
- Add unified CI workflow with PHP, JS/TS, and CSS quality checks - Only lint changed files for faster feedback - Add build validation to catch webpack errors - Add dependency tree validation - Add security scanning with composer/npm audit - Disable PHPUnit tests until test suite is comprehensive - Fix PHPUnit dependency conflicts with --ignore-platform-reqs - Add TypeScript type checking to CI pipeline Jobs: - PHP Quality: PHPCS + PHPStan on changed files (PHP 7.4-8.2) - JS/TS Quality: ESLint + Stylelint + TypeScript checks - Build Validation: webpack build + dependency tree validation - Security: composer audit + npm audit - PHPUnit: Disabled (ready to enable when needed) Files: - New: .github/workflows/ci.yml (315 lines, 5 jobs) - Disabled: phpcs-tests.yml → phpcs-tests.yml.disabled - Disabled: phpunit-tests.yml → phpunit-tests.yml.disabled - Updated: composer.json (added lint:changed script) - Updated: package.json (added lint:js:changed, lint:style:changed)
- Updated Storybook related packages in package.json, package-lock.json, and packages/icons/package.json to version 8.6.14 for improved features and bug fixes. - Ensured consistency across all relevant files for dependency management.
- Upgrade actions/checkout from v4 to v6 - Upgrade actions/setup-node from v4 to v6 - Replace manual composer caching with built-in cache: composer - Replace composer update with composer install for deterministic builds - Add cache: npm to setup-node in security job All actions now on latest stable versions with Node.js 24 runtime support. No breaking changes for existing workflow patterns.
Establish automated release foundation with commit message enforcement and standardized tooling. ## Features - Commitlint + husky for conventional commit enforcement - AI attribution blocking (local hooks + CI validation) - Expanded commit types/scopes aligned with issue labels - Release scripts standardization (version-update, changelog-update, extract-changelog) - Reusable GitHub Actions cache workflows ## Technical Changes - Add @commitlint/cli and @commitlint/config-conventional - Add husky for git hooks management - New commitlint.yml CI workflow - Updated labels.json with release-related labels Closes #1136
Add centralized detect-changes job that gates expensive CI jobs: - php-quality: only runs when PHP files change - js-quality: only runs when JS/CSS files change - build-validation: only runs when JS or npm deps change - npm-security: only runs when package.json/lock change - php-security: only runs when composer.json/lock change This significantly speeds up CI for: - PHP-only PRs (skip npm ci, build, JS linting) - JS-only PRs (skip composer, PHP linting) - Config/docs PRs (skip all expensive checks)
The attribution check is enforced by local git hooks - by the time a PR comment appears, commits are already pushed and can't be undone. Removed redundant/unhelpful notice from the PR comment message.
Allows proper nouns, project names, and acronyms in commit subjects. Only ALL_CAPS is warned against.
* feat(release): Phase 2 - Release Please integration Add automated version calculation and release PR creation: - release-please.yml workflow for weekly release PR creation - Configuration files for semantic versioning from commits - Integration documentation Part of automated release process implementation. * fix(release): use weekly schedule instead of push trigger Release Please now runs on Monday 9am UTC schedule to aggregate all commits into a single weekly release PR, rather than updating on every push to develop. Manual trigger (workflow_dispatch) available for testing. * fix(release): address CodeRabbit review items - Update action to googleapis/release-please-action@v4 (actively maintained) - Fix version output to avoid malformed '..' when no release created - Remove extra-files config, use update-versions.js instead (battle-tested) - Add workflow steps to run npm run version:update on release - Fix WordPress.org capitalization in docs - Update docs to reflect weekly schedule behavior
- request-approval.yml: Interactive approve/reject to #dev-releases - notify-support.yml: Customer changelog to #support-updates - Both support dry-run testing via workflow_dispatch
Enables Popup Maker conversion tracking and trigger actions for Forminator form submissions.
Enables conversion tracking and trigger actions for Elementor Pro form submissions with support for targeting specific forms.
Enables conversion tracking for Gutenberg-native Kali Forms.
Add complete HappyForms integration following the established three-component pattern: **Core JavaScript Integration:** - Event listener for 'happyforms.submitted' custom event - Form instance ID tracking for multi-form support - Popup ID injection on popup open **Core PHP Integration:** - Hook: `happyforms_submission_success` action - Detection: HappyForms_Core class check - Form retrieval via 'happyform' CPT - Defensive hook callbacks (no strict types) **Changes:** - assets/js/src/integration/happyforms.js (new) - classes/Integration/Form/HappyForms.php (new) - classes/Integrations.php (registration) - assets/js/src/integration/index.js (import) **Pattern Compliance:** ✅ Defensive hook callbacks ✅ Form instance ID tracking ✅ Proper phpcs:ignore comments ✅ WordPress coding standards
…dation Hook uses 2 args not 3. Added defensive form_id extraction for both ID and id keys.
…ghts - Add hero section with social proof stats (700K+ users, 30B+ popups, 4.95★) - Add feature grid showcasing 6 key Pro features - Exit Intent Triggers - Conversion Analytics - Advanced Targeting - A/B Testing - Mobile-First Features - Form Integrations - Add contextual Pro+ pitch for ecommerce users (WooCommerce/EDD detected) - Add contextual Pro+ pitch for LMS users (LifterLMS/LearnDash detected) - All upgrade links use generate_upgrade_url() for UTM tracking - Different display for Pro users vs Free users (license management message) Implements: monday-release-quick-wins-status.md #4
❌ Commit Validation ErrorYour commits don't pass validation. Common issues: Format RequirementsCommits must follow conventional commit format: Valid types: feat, fix, improve, perf, refactor, docs, style, test, build, ci, chore, revert Examples:
|
- Remove LearnDash check from LMS detection logic - Only LifterLMS is currently supported - Prevents showing LMS pitch for unsupported platform
WalkthroughThis pull request introduces form plugin integrations (Elementor Pro, Forminator, HappyForms, Kali Forms, Newsletter), automated release management via Release Please with Slack notifications, commit message validation using commitlint and Husky, new CI/CD workflows for code quality checks, Pro license handling enhancements, and Divi 4 compatibility improvements. Changes
Sequence Diagram(s)sequenceDiagram
participant FP as Form Plugin<br/>(Elementor, Forminator,<br/>HappyForms, Kali, Newsletter)
participant FE as Frontend<br/>Integration JS
participant PUM as PUM Integration<br/>Layer
participant BE as Backend<br/>Integration Class
participant DB as Conversion<br/>Tracking
Note over FP,DB: Successful Form Submission Flow
FP->>FE: Form submission event
FE->>FE: Extract form ID &<br/>popup context
FE->>PUM: formSubmission hook<br/>(provider, formId, popup)
PUM->>BE: Route to form provider<br/>handler
BE->>DB: on_success() → increment<br/>conversions & log submission
BE->>DB: pum_integrated_form_submission<br/>action fired
sequenceDiagram
participant Dev as Developer
participant Git as Git/GitHub
participant CLint as Commitlint<br/>+ Husky
participant RP as Release<br/>Please
participant GH as GitHub<br/>Actions
participant Slack as Slack
Note over Dev,Slack: Release Automation Flow
Dev->>Git: Push to develop/<br/>Create PR
Git->>CLint: Trigger commit-msg hook
CLint->>CLint: Validate format &<br/>reject AI attribution
CLint->>Dev: ✓ Pass or ✗ Fail
RP->>Git: Weekly schedule or<br/>manual trigger
RP->>RP: Aggregate commits since<br/>last release
RP->>Git: Create/Update release PR
RP->>GH: Dispatch version update
GH->>GH: Update plugin version files
Note over RP,Slack: Release Publication
Git->>RP: Release published
RP->>Slack: notify-support workflow
RP->>Slack: request-approval workflow
Slack->>Slack: Post to `#support-updates` &<br/>request approval
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes The diff spans 30+ files with heterogeneous changes: five similar but distinct form integration pairs (frontend + backend), multiple new CI/CD workflows with branching logic, license handling enhancements with new control flows, Divi compatibility additions, and dependency updates. While form integrations follow a consistent pattern (reducing review burden per integration), the workflows contain conditional logic, error handling paths, and Slack payload construction requiring careful scrutiny. License changes involve multiple new methods and state-dependent branching. Overall scope and logic density warrant moderate-to-high review effort. Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 18
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
classes/Controllers/PostTypes.php (1)
541-561: Docblock@returntype is inconsistent with actual return.The method now correctly returns
$replaceto comply with thereplace_editorfilter contract, but the docblock still declares@return void. Additionally, theWP_Posttype hint should be prefixed with a backslash for the fully qualified class name.Proposed fix
/** * Replace the editor interface when classic editor is forced. * - * @param bool $replace Whether to replace the editor. - * @param WP_Post $post The post object. - * @return void + * @param bool $replace Whether to replace the editor. + * @param \WP_Post $post The post object. + * @return bool Whether to replace the editor. */ public function replace_editor( $replace, $post ) {
🤖 Fix all issues with AI agents
In @.coderabbit.yaml:
- Around line 27-28: The configuration key auto_incremental_review is currently
placed at the wrong nesting level under reviews; move it under the auto_review
mapping so the schema is respected: remove auto_incremental_review from its
current location and add it as a child of auto_review (ensuring the auto_review
block exists), preserving its boolean value true and indentation consistent with
other keys; update any references expecting reviews.auto_incremental_review to
auto_review.auto_incremental_review.
In @.github/workflows/ci.yml:
- Around line 116-124: The workflow step named "Setup PHP" uses the action
shivammathur/setup-php@v2 with an invalid input `cache: composer`; remove the
`cache: composer` line from that step and rely on actions/cache for composer
caching or the action's built-in behavior instead, keeping the other inputs
(`php-version`, `extensions`, `tools`, `coverage`) unchanged.
- Around line 315-320: The Setup PHP step ("Setup PHP" using
shivammathur/setup-php@v2) includes an invalid input `cache: composer`; remove
that `cache: composer` line from the step and either add a separate
actions/cache step to cache Composer files or use the supported caching
mechanism documented for shivammathur/setup-php (do not pass `cache: composer`
to the action).
- Around line 353-359: The "Setup PHP" step using shivammathur/setup-php@v2
includes an invalid input "cache: composer"; remove that line from the step (or
replace it with a supported configuration) so the action only uses documented
inputs (php-version, extensions, coverage, etc.); if you want composer caching
when the job is enabled, implement it via actions/cache (cache composer files)
rather than the unsupported "cache: composer" input on
shivammathur/setup-php@v2.
- Line 34: Replace all uses of actions/checkout@v6 with actions/checkout@v5
throughout the workflow; locate every occurrence of the string
"actions/checkout@v6" (multiple spots noted) and change it to
"actions/checkout@v5" while leaving other actions like "actions/setup-node@v6"
unchanged.
In @.github/workflows/notify-support.yml:
- Around line 112-115: The current assignment using single quotes for CHANGELOG
(CHANGELOG='${{ steps.changelog.outputs.changelog }}') can break when the
changelog contains single quotes; update the workflow to capture the output into
a shell-safe variable (e.g., assign with double quotes or use a here-doc /
printf to preserve raw content) and then continue to produce CHANGELOG_ESCAPED
from that safe variable (the CHANGELOG and CHANGELOG_ESCAPED symbols are the
targets to update), ensuring the value is not wrapped in single quotes before
piping into jq -Rs .
In @.github/workflows/request-approval.yml:
- Line 91: The unquoted assignment CHANGELOG=${{
steps.changelog.outputs.changelog }} can break if the changelog contains spaces
or special chars; update the assignment to quote the output value, e.g.
CHANGELOG='${{ steps.changelog.outputs.changelog }}', so the shell receives the
JSON-quoted string intact and no word-splitting or special-character
interpretation occurs.
In @.husky/pre-commit:
- Around line 1-3: The pre-commit Husky hook is missing a shebang so the system
may choose the wrong shell; add a proper shebang as the first line (e.g.,
#!/bin/sh or #!/usr/bin/env sh) to the top of the .husky/pre-commit file, ensure
the rest of the file is valid POSIX shell syntax (or adjust to bash shebang if
using bash-specific features), and keep the hook executable (chmod +x
.husky/pre-commit).
In @.release-please-config.json:
- Around line 11-12: The "changelog-type" value is invalid; replace the current
"changelog-type": "wordpress" entry with a supported option ("default" or
"github") so Release Please can generate changelogs properly, e.g., set
"changelog-type" to "default" (keeping "changelog-path": "changelog.txt"
unchanged).
In @assets/js/src/integration/kaliForms.js:
- Around line 20-92: Both listeners (the global 'kaliformProcessCompleted'
handler and the per-submit 'kaliFormSuccess' successHandler) can call
window.PUM.integrations.formSubmission() twice; add a deduplication flag on the
form element (follow the pumNewsletterHandled pattern) so each form is handled
once: before calling window.PUM.integrations.formSubmission($form, ...) check if
the form has the handled flag (e.g., $form.data('pumFormHandled') or reuse
'pumNewsletterHandled'), return if set, otherwise set the flag and then call
formSubmission; apply this check/set in both the kaliformProcessCompleted
listener and inside the successHandler registered in the submit handler.
In @classes/Admin/BlockEditor.php:
- Around line 68-73: The function register_block_assets declares an unused $hook
parameter which static analysis flags; remove the $hook parameter from the
register_block_assets method signature and update any places that register it as
a callback (e.g., the add_action/add_filter call that references
'Admin\BlockEditor::register_block_assets' or register_block_type callbacks) so
the callback is registered without expecting arguments, then run a quick grep
for register_block_assets to ensure no other callers rely on the removed
parameter and adjust them if found.
- Around line 56-64: The method Admin\BlockEditor::register_block_assets
declares an unused parameter $hook; remove the unused parameter from the
signature (public static function register_block_assets()) or rename it to
$_hook to signal intentional non-usage, and update the docblock to remove or
reflect the renamed parameter so the signature and documentation match.
In @classes/Controllers/Compatibility/Builder/Divi.php:
- Around line 130-139: The docblock above the method that "Force classic editor
for popups when Divi 4 is active" incorrectly states it runs at priority 5 while
the hook is actually registered at priority 999 in setup_divi_hooks(); update
the docblock to reflect the real priority (999) or change the hook registration
in setup_divi_hooks() to 5 so they match—preferably adjust the docblock to say
"priority 999 (before PostTypes filter at priority 10)" and ensure the
referenced priority value in the comment matches the priority used in
setup_divi_hooks().
- Around line 171-178: The code in the Divi compatibility builder assumes
$field['desc'] exists when appending a note, which can trigger a PHP notice;
update the block that handles
$fields['general']['main']['enable_classic_editor'] (the $field reference inside
the if) to ensure 'desc' is set to an empty string if missing before
concatenation, then append the Divi 4 note and set 'disabled' as before so the
concatenation is safe.
In @classes/Integration/Form/Forminator.php:
- Around line 120-142: The on_success method calls
$this->increase_conversion($popup_id) without verifying $popup_id; update
on_success to guard the call the same way as KaliForms (e.g., check if $popup_id
is truthy) before invoking increase_conversion to avoid passing false to
pum_get_popup; keep the existing pum_integrated_form_submission call and leave
the unused $entry and $field_data_array parameters as-is for hook compatibility.
In @classes/Integration/Form/HappyForms.php:
- Around line 122-152: In HappyForms::on_success the code returns early when
$popup_id is falsy which prevents pum_integrated_form_submission() from being
called; change the flow so you only skip $this->increase_conversion( $popup_id )
when $popup_id is falsy but always call pum_integrated_form_submission([...])
with 'popup_id' => $popup_id, keeping the defensive form ID extraction and
existing payload keys; locate the early return that checks $popup_id in
on_success and remove it, ensuring increase_conversion remains conditional while
pum_integrated_form_submission is executed unconditionally.
In @docs/release-please-integration.md:
- Around line 27-31: The .release-please-config.json currently points
changelog-path to "changelog.txt" which doesn't exist; update the config to
reference the actual changelog file by setting the "changelog-path" for the
package entry to "CHANGELOG.md" (e.g., ensure the JSON includes "packages": {
".": { "changelog-path": "CHANGELOG.md" } }); modify the "changelog-path" value
in .release-please-config.json accordingly so Release Please can find and update
the changelog.
In @readme.txt:
- Line 372: The README line "Fix: Popup title aria-labelledby attribute was
being double-quoted. Thanks to the [Equalize
Digital](https://equalizedigital.com/) team." still contains a double space
before "to"; update the text to a single space ("Thanks to") by replacing
"Thanks to" with "Thanks to" in the README entry (the line starting "Fix: Popup
title aria-labelledby attribute...").
🧹 Nitpick comments (15)
includes/integrations/class-pum-woocommerce-integration.php (1)
101-105: Consider extracting the WooCommerce label for consistency.The
'WooCommerce'translation is defined inregister_conditions()as$woocommerce_textbut duplicated here. For maintainability, consider extracting it to a class constant or helper method.♻️ Optional refactor
+ private static function get_woocommerce_label() { + // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch + return __( 'WooCommerce', 'woocommerce' ); + } + public static function register_conditions( $conditions = [] ) { - // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch - $woocommerce_text = __( 'WooCommerce', 'woocommerce' ); + $woocommerce_text = self::get_woocommerce_label(); // ... rest of method } public static function condition_sort_order( $order = [] ) { - $order[ __( 'WooCommerce', 'woocommerce' ) ] = 5.256; // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch + $order[ self::get_woocommerce_label() ] = 5.256; return $order; }classes/Controllers/Compatibility/Builder/Divi.php (1)
102-128: Add blank line between methods for consistency.WordPress coding standards recommend a blank line between method definitions. There's a missing blank line between
is_divi_available()andis_divi4_active().🔧 Suggested fix
$is_divi_available = $theme_available || $plugin_available || $general_available; return $is_divi_available; } + /** * Detect if Divi 4 is active (not 5+).assets/js/src/integration/happyforms.js (1)
23-30: Consider validatingformIdbefore use.If the hidden input is missing or empty,
formIdwill beundefined, which could propagate toformSubmission. The$sameIdFormsfilter would also match all forms with undefined/empty values.Proposed defensive check
// Extract form ID from hidden input. const formId = $form.find( '[name="happyforms_form_id"]' ).val(); + + if ( ! formId ) { + return; + } // Generate instance ID from form element index (for multiple instances of same form).classes/Controllers/WP/Dashboard.php (1)
40-47: Consider adding permission check when registering the widget.The permission check in
render_basic_analytics_widget()prevents content rendering, but the widget is still registered for all admin users. Users without theedit_popupspermission will see an empty widget.♻️ Proposed improvement
public function register_dashboard_widgets() { + if ( ! current_user_can( $this->container->get_permission( 'edit_popups' ) ) ) { + return; + } + // Basic Analytics Widget (will be moved to free plugin). wp_add_dashboard_widget( 'pum_analytics_basic', __( 'Popup Analytics','popup-maker' ), [ $this, 'render_basic_analytics_widget' ] ); }.github/workflows/release-please.yml (1)
69-76: Consider adding error handling for git push failure.If the
git pushfails (e.g., due to branch protection rules or concurrent updates), the workflow will fail silently after the release is already created. This could leave version files out of sync.💡 Suggested improvement
- name: Commit version updates if: ${{ steps.release.outputs.release_created }} run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add -A git diff --staged --quiet || git commit -m "chore(release): update version files to ${{ steps.release.outputs.tag_name }}" - git push + git push || { + echo "::error::Failed to push version updates. Manual intervention may be required." + exit 1 + }.github/workflows/notify-support.yml (1)
197-201: Slack webhook URL exposure risk in error logs.If the curl command fails, error messages might expose the webhook URL. Consider suppressing verbose error output or using
-f(fail silently) with explicit error handling.💡 Suggested improvement
- name: Send to #support-updates if: steps.vars.outputs.dry_run != 'true' env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_SUPPORT }} run: | echo "📤 Sending support notification to Slack..." - curl -X POST "$SLACK_WEBHOOK_URL" \ + HTTP_CODE=$(curl -s -o /tmp/slack_response.txt -w "%{http_code}" -X POST "$SLACK_WEBHOOK_URL" \ -H "Content-Type: application/json" \ - -d '${{ steps.payload.outputs.payload }}' + -d '${{ steps.payload.outputs.payload }}') + if [ "$HTTP_CODE" -ne 200 ]; then + echo "::error::Slack notification failed with HTTP $HTTP_CODE" + exit 1 + fi echo "" echo "✅ Slack message sent to #support-updates!".github/workflows/request-approval.yml (1)
127-131: Fragile JSON quote stripping with bash substring.Using
${CHANGELOG:1:-1}to strip JSON quotes is fragile. If the changelog is empty or malformed, this could produce unexpected output. Consider a more robust approach.💡 Suggested improvement
{ "type": "section", "text": { "type": "mrkdwn", - "text": "*Changelog Preview:*\n${CHANGELOG:1:-1}" + "text": "*Changelog Preview:*\n$(echo $CHANGELOG | jq -r '.')" } },Alternatively, avoid double-encoding by not using
jq -Rsinitially and instead escape just before payload construction.classes/Integration/Form/KaliForms.php (1)
50-70: Consider guardingget_forms()withenabled()check.Unlike
Forminator.phpwhich checks$this->enabled()before querying, this method queries posts unconditionally. If the Kali Forms plugin is deactivated but this method is called, it will still work (returning empty results), but an explicit guard would be more consistent with other integrations.♻️ Optional consistency improvement
public function get_forms() { + if ( ! $this->enabled() ) { + return []; + } + $forms = get_posts( [ 'post_type' => 'kaliforms_forms',classes/Integration/Form/HappyForms.php (1)
78-95: Minor inconsistency: Return type differs from other integrations.This method returns
falseon failure, whileKaliForms.phpreturnsnull. Consider aligning return types for consistency, though this is a minor concern since both are falsy.classes/Integration/Form/Elementor.php (2)
154-161: Consider adding a translators comment for the sprintf format.The format string
'%s (in %s)'concatenates translated strings. While the individual strings are translatable, the combined format lacks a translators comment to provide context for translators.Suggested improvement
foreach ( $forms as $form ) { // Use element_id as the unique identifier (system adds provider prefix). $location = ! empty( $form['post_title'] ) ? $form['post_title'] : __( 'Unknown Page', 'popup-maker' ); + /* translators: 1: Form name, 2: Page/post title where form is located */ $form_selectlist[ $form['element_id'] ] = sprintf( '%s (in %s)', $form['name'], $location ); }
101-122: Potential performance concern:get_post()called in a loop.For sites with many unique Elementor forms, calling
get_post()for each result in the loop may cause multiple database queries. Since this is cached for 1 hour and only runs once per cache miss, the impact is minimal, but worth noting.Consider batch-fetching posts using
get_posts()withpost__inif form count becomes a performance concern in the future.assets/js/src/integration/elementor.js (1)
12-14: Clarify variable naming:$formholds a DOM element, not a jQuery object.The
$prefix convention typically denotes jQuery objects, but$(this)[0]returns the raw DOM element. Consider renaming toformfor clarity, or keep the jQuery object if that's whatformSubmissionexpects.Suggested clarification
- const $form = $( this )[ 0 ]; + const form = $( this )[ 0 ]; // Get element_id from the widget container. // Elementor form widgets are inside a .elementor-element-{id} container. const $widget = $( this ).closest( '[data-id]' ); const elementId = $widget.length ? $widget.attr( 'data-id' ) : 'unknown'; - window.PUM.integrations.formSubmission( $form, { + window.PUM.integrations.formSubmission( form, { formProvider, formId: elementId, } );assets/js/src/integration/newsletter.js (2)
63-65: Remove redundantwindow.PUMguard.Based on learnings, guards that check for
window.PUMin integration files underassets/js/src/integration/are redundant because these files are bundled withwindow.PUM. This check creates dead code.Suggested fix
const handleSuccess = ( container, popupId ) => { // Prevent duplicate handling. if ( container.dataset.pumNewsletterHandled ) { return; } container.dataset.pumNewsletterHandled = 'true'; - if ( ! window.PUM || ! window.PUM.integrations ) { - return; - } - window.PUM.integrations.formSubmission( $( container ), {
176-180: Remove redundantwindow.PUMguard in initialization.Per learnings, this guard is unnecessary since the integration script is bundled with Popup Maker.
Suggested fix
// Initialize on DOM ready. $( () => { - if ( ! window.PUM ) { - return; - } - // Observe existing forms. initObservers();bin/extract-changelog.js (1)
46-48: Consider escaping hyphen for completeness.While the current regex metacharacter escaping works for most cases, adding hyphen (
-) to the escaped characters would makeescapeRegexmore robust for edge cases, though it's unlikely to be needed for version strings.Optional enhancement
function escapeRegex( str ) { - return str.replace( /[.+*?^$[\](){}|\\]/g, '\\$&' ); + return str.replace( /[.+*?^$[\](){}|\\-]/g, '\\$&' ); }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (43)
.coderabbit.yaml.github/workflows/ci.yml.github/workflows/commitlint.yml.github/workflows/notify-support.yml.github/workflows/phpcs-tests.yml.disabled.github/workflows/phpunit-tests.yml.disabled.github/workflows/release-please.yml.github/workflows/request-approval.yml.husky/commit-msg.husky/pre-commit.release-please-config.json.release-please-manifest.jsonCHANGELOG.mdassets/js/src/integration/elementor.jsassets/js/src/integration/forminator.jsassets/js/src/integration/happyforms.jsassets/js/src/integration/index.jsassets/js/src/integration/kaliForms.jsassets/js/src/integration/newsletter.jsbin/extract-changelog.jsclasses/Admin/BlockEditor.phpclasses/Admin/Settings.phpclasses/Admin/Templates.phpclasses/Controllers/Compatibility/Builder/Divi.phpclasses/Controllers/PostTypes.phpclasses/Controllers/WP/Dashboard.phpclasses/Extension/License.phpclasses/Integration/Form/Elementor.phpclasses/Integration/Form/Forminator.phpclasses/Integration/Form/HappyForms.phpclasses/Integration/Form/KaliForms.phpclasses/Integration/Form/Newsletter.phpclasses/Integrations.phpcommitlint.config.jscomposer.jsondocs/release-please-integration.mdincludes/integrations/class-pum-woocommerce-integration.phppackage.jsonpackages/fields/src/lib/utils.tsxpackages/fields/src/types/fields.tspackages/icons/package.jsonpackages/types/src/index.d.tsreadme.txt
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{js,ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use PUM.hooks system for frontend extensibility in JavaScript/TypeScript
Files:
assets/js/src/integration/index.jspackages/fields/src/lib/utils.tsxbin/extract-changelog.jscommitlint.config.jspackages/fields/src/types/fields.tspackages/types/src/index.d.tsassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsassets/js/src/integration/kaliForms.jsassets/js/src/integration/newsletter.jsassets/js/src/integration/forminator.js
**/*.{js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/pm-best-practices.mdc)
**/*.{js,jsx}: Use thePUM.hooksevent manager for JavaScript actions and filters on any page where Popup Maker scripts are loaded
Use JavaScript hooks likepum.popup.beforeOpen,pum.popup.afterOpen,pum.popup.beforeClose,pum.popup.afterClose, andpum.integration.form.successfor extending Popup Maker functionality
Use the globalPUMobject to interact with popups via JavaScript methods likePUM.open(),PUM.close(), andPUM.getSettings()
DO NOT rely on the older$.fn.popmakemethods directly in JavaScript if aPUM.*equivalent exists, asPUM.*provides a more stable, public-facing API
Fire thepum.integration.form.successJavaScript action after a successful form submission to integrate a new form plugin with Popup Maker's Form Submission trigger
Files:
assets/js/src/integration/index.jsbin/extract-changelog.jscommitlint.config.jsassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsassets/js/src/integration/kaliForms.jsassets/js/src/integration/newsletter.jsassets/js/src/integration/forminator.js
**/*.{js,ts,tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/pm-js-api-reference.mdc)
**/*.{js,ts,tsx,jsx}: Use the globalwindow.PUMobject as the primary way to interact with popups on the frontend. Available methods include:PUM.open(),PUM.close(),PUM.getPopup(),PUM.getSettings(),PUM.getSetting(),PUM.getCookie(),PUM.setCookie(),PUM.clearCookie(),PUM.clearCookies(), andPUM.checkConditions()
Use the jQuerypopmake()method directly on popup jQuery objects as an alternative to the globalPUMobject. Available methods include:popmake('open', callback),popmake('close', callback),popmake('getSettings'), andpopmake('getContainer')
Use Popup Maker's hooks system (PUM.hooks) to extend frontend functionality in an event-driven manner. UsePUM.hooks.addAction()for actions andPUM.hooks.addFilter()for filters. Key actions include:pum.popup.beforeOpen,pum.popup.afterOpen,pum.popup.beforeClose,pum.popup.afterClose, andpum.integration.form.success
For form integrations that submit via AJAX, listen for the form's successful submission event and callwindow.PUM.integrations.formSubmission()with the form's jQuery object and an object containingformProviderandformId
Files:
assets/js/src/integration/index.jspackages/fields/src/lib/utils.tsxbin/extract-changelog.jscommitlint.config.jspackages/fields/src/types/fields.tspackages/types/src/index.d.tsassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsassets/js/src/integration/kaliForms.jsassets/js/src/integration/newsletter.jsassets/js/src/integration/forminator.js
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/pm-js-api-reference.mdc)
To extend the Call to Action editor in
@popup-maker/cta-editor, use the Registry API methods:registerEditorTab()to add new tabs,registerEditorHeaderAction()to add header buttons, andregisterEditorHeaderOption()to add menu items
Files:
assets/js/src/integration/index.jspackages/fields/src/lib/utils.tsxbin/extract-changelog.jscommitlint.config.jspackages/fields/src/types/fields.tspackages/types/src/index.d.tsassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsassets/js/src/integration/kaliForms.jsassets/js/src/integration/newsletter.jsassets/js/src/integration/forminator.js
composer.json
📄 CodeRabbit inference engine (.cursor/rules/wordpress-expert.mdc)
Use Composer for dependency management when building advanced plugins or themes; check composer.json for namespace prefixes when using brianhenry/strauss for compiled dependencies
Files:
composer.json
**/*.php
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.php: Usepum_prefixes for all public functions and hooks in PHP
Use custom\PopupMaker\{ExtensionName}\namespace for classes/functions/hooks in PHP
Follow WordPress coding standards enforced by PHPCS
Use dependency injection over global access in PHP
Inline comments in PHP must end in full-stops, exclamation marks, or question marks (Squiz.Commenting.InlineComment.InvalidEndChar)
Never use strict PHP types on methods hooked to third-party actions/filters; use defensive validation instead
All PHP code must be compatible with PHP 7.4+; forbidden features include union types (e.g.,string|int),mixedtype, named arguments, and match expressions
Use%ifor the table name in $wpdb prepared queries
Check for Popup Maker existence before calling functions
Use defensive validation in hook callbacks for graceful handling of third-party plugin parameter changes
**/*.php: Use thepum_orPUM_prefix for your functions, classes, and hooks to maintain consistency with the core plugin's standards
DO NOT use the olderpopmake_prefix. This is for legacy code being phased out. Usepum_equivalent instead
Use thePopupMaker\namespace for new, modern integrations where appropriate, following the structure seen in theclasses/directory
Check for the existence of Popup Maker functions and classes before calling them usingfunction_exists()to prevent fatal errors if the core plugin is not active
DO NOT use deprecated functions or classes in Popup Maker integrations. Refer to the deprecation guide for alternatives
Use thepum_enqueue_scriptandpum_enqueue_stylefunctions for your assets to allow inclusion in Popup Maker's Asset Cache for optimized performance
DO NOT enqueue your own copies of libraries that Popup Maker already includes, such as jQuery or jQuery UI. Use the registered handles as dependencies
Use thepum_registered_triggers,pum_registered_cookies, andpum_registered_conditionsfilters to register custom items so they appea...
Files:
classes/Controllers/PostTypes.phpclasses/Admin/Templates.phpclasses/Admin/BlockEditor.phpclasses/Integration/Form/Forminator.phpclasses/Integration/Form/HappyForms.phpclasses/Integration/Form/Elementor.phpclasses/Integrations.phpincludes/integrations/class-pum-woocommerce-integration.phpclasses/Integration/Form/KaliForms.phpclasses/Integration/Form/Newsletter.phpclasses/Admin/Settings.phpclasses/Controllers/Compatibility/Builder/Divi.phpclasses/Extension/License.phpclasses/Controllers/WP/Dashboard.php
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Do not useanytype in TypeScript; useunknownfor dynamic values outside of the type system, or find/define the type in another package or reasonably for internal use
Prioritize@popup-maker/*packages over@wordpress/*when available for better optimization and consistency
Use Popup Maker's data stores (popupStore,callToActionStore) instead of WordPress core data when possible
Files:
packages/fields/src/lib/utils.tsxpackages/fields/src/types/fields.tspackages/types/src/index.d.ts
**/*.{tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/pm-js-api-reference.mdc)
**/*.{tsx,jsx}: In React components within the admin area, use@wordpress/data'suseSelecthook with Popup Maker's data stores (callToActionStore,licenseStore,popupStore,settingsStore) to access and manage plugin state
Use reusable React components from the@popup-maker/componentspackage for building admin interfaces, including:ListTable,PopupSelectControl,EntitySelectControl,URLControl, andConfirmDialogue
Use the declarative field configuration system from@popup-maker/fieldspackage to render form fields from configuration objects in admin interfaces
Files:
packages/fields/src/lib/utils.tsx
🧠 Learnings (34)
📚 Learning: 2026-01-09T02:58:44.304Z
Learnt from: danieliser
Repo: PopupMaker/Popup-Maker PR: 1144
File: assets/js/src/integration/happyforms.js:8-35
Timestamp: 2026-01-09T02:58:44.304Z
Learning: In assets/js/src/integration/**/*.js, guards that check for window.PUM (e.g., conditional blocks that run only if window.PUM exists) are redundant because these integration files are bundled with window.PUM. Remove such guards and any branches dependent on the presence of window.PUM to simplify code and avoid dead branches.
Applied to files:
assets/js/src/integration/index.jsassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsassets/js/src/integration/kaliForms.jsassets/js/src/integration/newsletter.jsassets/js/src/integration/forminator.js
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Applies to **/*.{js,jsx} : Fire the `pum.integration.form.success` JavaScript action after a successful form submission to integrate a new form plugin with Popup Maker's Form Submission trigger
Applied to files:
assets/js/src/integration/index.jsclasses/Integration/Form/Forminator.phpclasses/Integration/Form/HappyForms.phpclasses/Integration/Form/Elementor.phpassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsclasses/Integration/Form/KaliForms.phpassets/js/src/integration/kaliForms.jsclasses/Integration/Form/Newsletter.phpassets/js/src/integration/newsletter.jsassets/js/src/integration/forminator.jsreadme.txt
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Avoid using the `the_popup_content` filter; use `pum_popup_content` instead
Applied to files:
classes/Controllers/PostTypes.php
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Applies to **/*.php : Use `pum_popup_content` filter instead of the deprecated `the_popup_content` filter
Applied to files:
classes/Controllers/PostTypes.php
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Applies to **/*.php : Use the `pum_popup_settings_fields` and `pum_theme_settings_fields` filters to add new settings tabs, sections, and fields to the Popup and Theme editors
Applied to files:
classes/Controllers/PostTypes.phpclasses/Admin/Settings.phpclasses/Controllers/Compatibility/Builder/Divi.php
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Applies to **/*.php : Use the methods on popup and theme objects to get or update settings (e.g., `$popup->get_setting()`) rather than `get_post_meta` or `update_post_meta`
Applied to files:
classes/Controllers/PostTypes.php
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Applies to **/*.php : Use the `pum_enqueue_script` and `pum_enqueue_style` functions for your assets to allow inclusion in Popup Maker's Asset Cache for optimized performance
Applied to files:
classes/Admin/BlockEditor.php
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Applies to **/*.{js,jsx} : Use the `PUM.hooks` event manager for JavaScript actions and filters on any page where Popup Maker scripts are loaded
Applied to files:
classes/Admin/BlockEditor.phpassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsassets/js/src/integration/kaliForms.jsassets/js/src/integration/newsletter.jsassets/js/src/integration/forminator.js
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Applies to **/*.php : DO NOT enqueue your own copies of libraries that Popup Maker already includes, such as jQuery or jQuery UI. Use the registered handles as dependencies
Applied to files:
classes/Admin/BlockEditor.php
📚 Learning: 2025-12-20T07:31:31.480Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-20T07:31:31.480Z
Learning: Applies to tests/e2e/**/*.{ts,js} : Write E2E tests using Playwright in the `tests/e2e/` directory to test popup functionality and admin workflows against local WordPress environment
Applied to files:
.github/workflows/ci.yml
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Create form integrations by extending `PUM_Abstract_Integration_Form` class and registering via `pum_integrations` filter
Applied to files:
classes/Integration/Form/Forminator.phpclasses/Integration/Form/HappyForms.phpclasses/Integration/Form/Elementor.phpclasses/Integrations.phpassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsclasses/Integration/Form/KaliForms.phpassets/js/src/integration/kaliForms.jsclasses/Integration/Form/Newsletter.phpassets/js/src/integration/forminator.jsreadme.txt
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Applies to **/*.php : Use the `PopupMaker\` namespace for new, modern integrations where appropriate, following the structure seen in the `classes/` directory
Applied to files:
classes/Integration/Form/Forminator.phpclasses/Integration/Form/HappyForms.phpclasses/Integration/Form/Elementor.phpclasses/Integration/Form/KaliForms.phpclasses/Integration/Form/Newsletter.php
📚 Learning: 2025-12-20T07:32:04.308Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-js-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:04.308Z
Learning: Applies to **/*.{js,ts,tsx,jsx} : For form integrations that submit via AJAX, listen for the form's successful submission event and call `window.PUM.integrations.formSubmission()` with the form's jQuery object and an object containing `formProvider` and `formId`
Applied to files:
classes/Integration/Form/Forminator.phpclasses/Integration/Form/HappyForms.phpclasses/Integration/Form/Elementor.phpassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsclasses/Integration/Form/KaliForms.phpassets/js/src/integration/kaliForms.jsclasses/Integration/Form/Newsletter.phpassets/js/src/integration/newsletter.jsassets/js/src/integration/forminator.js
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Form integration JavaScript must fire the `pum.integration.form.success` action on successful form submission
Applied to files:
classes/Integration/Form/Forminator.phpclasses/Integration/Form/HappyForms.phpclasses/Integration/Form/Elementor.phpassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsclasses/Integration/Form/KaliForms.phpassets/js/src/integration/kaliForms.jsclasses/Integration/Form/Newsletter.phpassets/js/src/integration/newsletter.jsassets/js/src/integration/forminator.js
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Applies to **/*.php : DO NOT use deprecated functions or classes in Popup Maker integrations. Refer to the deprecation guide for alternatives
Applied to files:
classes/Integration/Form/Forminator.phpclasses/Integration/Form/HappyForms.phpclasses/Integration/Form/Elementor.phpclasses/Integration/Form/KaliForms.php
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Hook into `pum_integrated_form_submission` action to respond to successful form submissions from integrated forms
Applied to files:
classes/Integration/Form/Forminator.phpclasses/Integration/Form/HappyForms.phpclasses/Integration/Form/Elementor.phpassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsclasses/Integration/Form/KaliForms.phpassets/js/src/integration/kaliForms.jsclasses/Integration/Form/Newsletter.phpassets/js/src/integration/newsletter.jsassets/js/src/integration/forminator.js
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Avoid directly instantiating `PUM_Fields`, `PUM_Form`, and related old settings API classes; use React-based admin interfaces instead
Applied to files:
classes/Integration/Form/HappyForms.phpclasses/Integration/Form/Elementor.phpclasses/Integrations.php
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Applies to **/*.{js,jsx} : Use JavaScript hooks like `pum.popup.beforeOpen`, `pum.popup.afterOpen`, `pum.popup.beforeClose`, `pum.popup.afterClose`, and `pum.integration.form.success` for extending Popup Maker functionality
Applied to files:
classes/Integration/Form/HappyForms.phpassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsclasses/Integration/Form/KaliForms.phpassets/js/src/integration/kaliForms.jsassets/js/src/integration/newsletter.jsassets/js/src/integration/forminator.js
📚 Learning: 2025-12-20T07:32:04.308Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-js-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:04.308Z
Learning: Applies to **/*.{js,ts,tsx,jsx} : Use Popup Maker's hooks system (`PUM.hooks`) to extend frontend functionality in an event-driven manner. Use `PUM.hooks.addAction()` for actions and `PUM.hooks.addFilter()` for filters. Key actions include: `pum.popup.beforeOpen`, `pum.popup.afterOpen`, `pum.popup.beforeClose`, `pum.popup.afterClose`, and `pum.integration.form.success`
Applied to files:
classes/Integration/Form/HappyForms.phpassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsclasses/Integration/Form/KaliForms.phpassets/js/src/integration/kaliForms.jsassets/js/src/integration/newsletter.jsassets/js/src/integration/forminator.js
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Hook into `pum_init` action to execute custom functionality after Popup Maker initialization
Applied to files:
classes/Integration/Form/HappyForms.phpassets/js/src/integration/happyforms.jsassets/js/src/integration/elementor.jsclasses/Integration/Form/KaliForms.phpclasses/Integration/Form/Newsletter.phpassets/js/src/integration/newsletter.jsclasses/Controllers/Compatibility/Builder/Divi.phpassets/js/src/integration/forminator.js
📚 Learning: 2025-12-20T07:32:04.308Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-js-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:04.308Z
Learning: Applies to **/*.{js,ts,tsx,jsx} : Use the global `window.PUM` object as the primary way to interact with popups on the frontend. Available methods include: `PUM.open()`, `PUM.close()`, `PUM.getPopup()`, `PUM.getSettings()`, `PUM.getSetting()`, `PUM.getCookie()`, `PUM.setCookie()`, `PUM.clearCookie()`, `PUM.clearCookies()`, and `PUM.checkConditions()`
Applied to files:
assets/js/src/integration/happyforms.jsassets/js/src/integration/kaliForms.jsassets/js/src/integration/newsletter.jsassets/js/src/integration/forminator.js
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Use `pum_registered_conditions` filter to register new popup targeting conditions with custom configuration
Applied to files:
includes/integrations/class-pum-woocommerce-integration.php
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Modern Popup Maker admin interface uses React-based architecture with `wordpress/data` stores. Be aware of this direction for future extensions
Applied to files:
assets/js/src/integration/elementor.js
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Hook into `pum_save_popup`, `pum_save_theme`, or `pum_save_settings` actions to respond to data persistence events
Applied to files:
assets/js/src/integration/elementor.js
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Use `pum_enqueue_scripts` action to properly enqueue scripts and styles for Popup Maker extensions
Applied to files:
classes/Integration/Form/KaliForms.php
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Hook into `pum_analytics_conversion` and `pum_analytics_open` actions to track and respond to popup analytics events
Applied to files:
assets/js/src/integration/kaliForms.jsclasses/Integration/Form/Newsletter.phpclasses/Controllers/WP/Dashboard.php
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Applies to **/*.{js,jsx} : Use the global `PUM` object to interact with popups via JavaScript methods like `PUM.open()`, `PUM.close()`, and `PUM.getSettings()`
Applied to files:
assets/js/src/integration/kaliForms.jsassets/js/src/integration/newsletter.js
📚 Learning: 2025-12-20T07:31:31.480Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-20T07:31:31.480Z
Learning: Applies to **/*.{ts,tsx} : Prioritize `popup-maker/*` packages over `wordpress/*` when available for better optimization and consistency
Applied to files:
.release-please-config.json
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Use `pum_settings_fields`, `pum_popup_settings_fields`, and `pum_theme_settings_fields` filters to modify admin field configurations
Applied to files:
classes/Admin/Settings.php
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Use `PUM_Utils_Options` static methods (`get_all()`, `get()`, `update()`, `update_all()`, `delete()`) for the core settings API
Applied to files:
classes/Admin/Settings.php
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Use `pum_get_option()` and `pum_update_option()` functions for accessing and modifying Popup Maker settings
Applied to files:
classes/Admin/Settings.php
📚 Learning: 2025-12-20T07:32:32.164Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-php-api-reference.mdc:0-0
Timestamp: 2025-12-20T07:32:32.164Z
Learning: Applies to *.php : Use `$popup->is_enabled()` to check if a popup is enabled, and `$popup->is_loadable()` to check if it should load on the current page
Applied to files:
classes/Controllers/Compatibility/Builder/Divi.php
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Applies to **/*.php : Use the `PUM_Extension_Activation` class found in `/includes/pum-sdk/` instead of the deprecated `PUM_Activator` class
Applied to files:
classes/Extension/License.php
📚 Learning: 2025-12-20T07:31:54.054Z
Learnt from: CR
Repo: PopupMaker/Popup-Maker PR: 0
File: .cursor/rules/pm-best-practices.mdc:0-0
Timestamp: 2025-12-20T07:31:54.054Z
Learning: Applies to **/*.php : DO NOT use the older `popmake_` prefix. This is for legacy code being phased out. Use `pum_` equivalent instead
Applied to files:
classes/Extension/License.php
🧬 Code graph analysis (10)
bin/extract-changelog.js (1)
bin/update-versions.js (1)
version(23-23)
classes/Integration/Form/Forminator.php (2)
classes/Abstract/Integration/Form.php (2)
should_process_submission(86-91)increase_conversion(74-78)includes/functions/developers.php (1)
pum_integrated_form_submission(52-70)
classes/Integration/Form/HappyForms.php (2)
classes/Abstract/Integration/Form.php (3)
PUM_Abstract_Integration_Form(12-92)should_process_submission(86-91)increase_conversion(74-78)includes/functions/developers.php (1)
pum_integrated_form_submission(52-70)
classes/Integration/Form/Elementor.php (2)
classes/Abstract/Integration/Form.php (2)
should_process_submission(86-91)increase_conversion(74-78)includes/functions/developers.php (1)
pum_integrated_form_submission(52-70)
classes/Integrations.php (6)
classes/Integration/Form/Newsletter.php (1)
PUM_Integration_Form_Newsletter(25-121)classes/Integration/Form/WPForms.php (1)
PUM_Integration_Form_WPForms(9-112)classes/Integration/Form/BricksBuilder.php (1)
PUM_Integration_Form_BricksBuilder(9-217)classes/Integration/Form/Elementor.php (1)
PUM_Integration_Form_Elementor(9-233)classes/Integration/Form/KaliForms.php (1)
PUM_Integration_Form_KaliForms(9-195)classes/Integration/Form/HappyForms.php (1)
PUM_Integration_Form_HappyForms(9-175)
includes/integrations/class-pum-woocommerce-integration.php (3)
classes/Integrations.php (1)
register_conditions(214-230)classes/Conditions.php (1)
register_conditions(486-531)packages/i18n/src/index.ts (1)
__(29-32)
classes/Integration/Form/KaliForms.php (2)
classes/Abstract/Integration/Form.php (3)
PUM_Abstract_Integration_Form(12-92)should_process_submission(86-91)increase_conversion(74-78)includes/functions/developers.php (1)
pum_integrated_form_submission(52-70)
assets/js/src/integration/kaliForms.js (1)
tests/unit/js/setup.js (1)
event(203-203)
classes/Integration/Form/Newsletter.php (2)
classes/Abstract/Integration/Form.php (3)
PUM_Abstract_Integration_Form(12-92)should_process_submission(86-91)increase_conversion(74-78)includes/functions/developers.php (1)
pum_integrated_form_submission(52-70)
classes/Controllers/WP/Dashboard.php (1)
classes/Plugin/Core.php (1)
get_permission(364-368)
🪛 actionlint (1.7.10)
.github/workflows/ci.yml
124-124: input "cache" is not defined in action "shivammathur/setup-php@v2". available inputs are "coverage", "extensions", "github-token", "ini-file", "ini-values", "php-version", "php-version-file", "tools"
(action)
320-320: input "cache" is not defined in action "shivammathur/setup-php@v2". available inputs are "coverage", "extensions", "github-token", "ini-file", "ini-values", "php-version", "php-version-file", "tools"
(action)
335-335: constant expression "false" in condition. remove the if: section
(if-cond)
359-359: input "cache" is not defined in action "shivammathur/setup-php@v2". available inputs are "coverage", "extensions", "github-token", "ini-file", "ini-values", "php-version", "php-version-file", "tools"
(action)
🪛 markdownlint-cli2 (0.18.1)
CHANGELOG.md
5-5: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
13-13: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
17-17: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
🪛 PHPMD (2.15.0)
classes/Admin/BlockEditor.php
68-68: Avoid unused parameters such as '$hook'. (undefined)
(UnusedFormalParameter)
classes/Integration/Form/Forminator.php
120-120: Avoid unused parameters such as '$entry'. (undefined)
(UnusedFormalParameter)
120-120: Avoid unused parameters such as '$field_data_array'. (undefined)
(UnusedFormalParameter)
classes/Integration/Form/HappyForms.php
122-122: Avoid unused parameters such as '$submission'. (undefined)
(UnusedFormalParameter)
classes/Integration/Form/Elementor.php
173-173: Avoid unused parameters such as '$record'. (undefined)
(UnusedFormalParameter)
classes/Integration/Form/Newsletter.php
76-76: Avoid unused parameters such as '$id'. (undefined)
(UnusedFormalParameter)
| # Auto-incremental reviews when new commits pushed | ||
| auto_incremental_review: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto_incremental_review is at the wrong nesting level.
According to the CodeRabbit schema, auto_incremental_review should be nested under auto_review, not directly under reviews.
🔧 Proposed fix
auto_review:
enabled: true
base_branches:
- develop
+ auto_incremental_review: true
# Collapse file walkthrough in PR comments
collapse_walkthrough: false
@@ -24,9 +25,6 @@
# Review full files or just changed lines
review_full_file_on_changed_file: false
- # Auto-incremental reviews when new commits pushed
- auto_incremental_review: true
-
# Review language
language: en-US📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Auto-incremental reviews when new commits pushed | |
| auto_incremental_review: true |
🤖 Prompt for AI Agents
In @.coderabbit.yaml around lines 27 - 28, The configuration key
auto_incremental_review is currently placed at the wrong nesting level under
reviews; move it under the auto_review mapping so the schema is respected:
remove auto_incremental_review from its current location and add it as a child
of auto_review (ensuring the auto_review block exists), preserving its boolean
value true and indentation consistent with other keys; update any references
expecting reviews.auto_incremental_review to
auto_review.auto_incremental_review.
| php_deps: ${{ steps.changes.outputs.php_deps }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
latest version actions/checkout GitHub Action
💡 Result:
As of January 13, 2026 the latest official release is actions/checkout v5. [1][2]
Sources:
- actions/checkout repository (Checkout v5 notes). [1]
- GitHub Marketplace checkout action page. [2]
🌐 Web query:
latest version actions/setup-node GitHub Action
💡 Result:
The current latest release is actions/setup-node v6.1.0 (released Dec 3, 2025). Use either actions/setup-node@v6 or actions/setup-node@v6.1.0 in workflows. [1][2]
Sources:
[1] actions/setup-node repository. [2] Releases (v6.1.0).
🏁 Script executed:
cat -n .github/workflows/ci.yml | head -50Repository: PopupMaker/Popup-Maker
Length of output: 1779
🏁 Script executed:
cat -n .github/workflows/ci.yml | sed -n '30,40p;80,90p;160,170p;190,200p;240,250p;285,295p;348,355p'Repository: PopupMaker/Popup-Maker
Length of output: 2358
Fix actions/checkout@v6 - this version does not exist.
The workflow uses actions/checkout@v6 at multiple locations, but the latest stable version is v5 (as of January 2026). Version 6 does not exist for checkout. Update all occurrences to actions/checkout@v5.
In contrast, actions/setup-node@v6 is valid and exists (v6.1.0 released December 3, 2025), so those usages are correct.
Also applies to: 83, 162, 244, 287, 351
🤖 Prompt for AI Agents
In @.github/workflows/ci.yml at line 34, Replace all uses of actions/checkout@v6
with actions/checkout@v5 throughout the workflow; locate every occurrence of the
string "actions/checkout@v6" (multiple spots noted) and change it to
"actions/checkout@v5" while leaving other actions like "actions/setup-node@v6"
unchanged.
| - name: Setup PHP | ||
| if: steps.changed-files.outputs.any_changed == 'true' | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php-version }} | ||
| extensions: curl, zip | ||
| tools: composer, cs2pr, phpcs | ||
| coverage: none | ||
| cache: composer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid cache input for shivammathur/setup-php action.
Per static analysis, shivammathur/setup-php@v2 does not have a cache input. The available inputs are: coverage, extensions, github-token, ini-file, ini-values, php-version, php-version-file, tools.
🔧 Suggested fix - remove invalid input
- name: Setup PHP
if: steps.changed-files.outputs.any_changed == 'true'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: curl, zip
tools: composer, cs2pr, phpcs
coverage: none
- cache: composerNote: Composer caching is typically handled via actions/cache separately or via shivammathur/setup-php's built-in composer caching (which requires no cache input).
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Setup PHP | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: curl, zip | |
| tools: composer, cs2pr, phpcs | |
| coverage: none | |
| cache: composer | |
| - name: Setup PHP | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: curl, zip | |
| tools: composer, cs2pr, phpcs | |
| coverage: none |
🧰 Tools
🪛 actionlint (1.7.10)
124-124: input "cache" is not defined in action "shivammathur/setup-php@v2". available inputs are "coverage", "extensions", "github-token", "ini-file", "ini-values", "php-version", "php-version-file", "tools"
(action)
🤖 Prompt for AI Agents
In @.github/workflows/ci.yml around lines 116 - 124, The workflow step named
"Setup PHP" uses the action shivammathur/setup-php@v2 with an invalid input
`cache: composer`; remove the `cache: composer` line from that step and rely on
actions/cache for composer caching or the action's built-in behavior instead,
keeping the other inputs (`php-version`, `extensions`, `tools`, `coverage`)
unchanged.
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: '8.2' | ||
| tools: composer | ||
| cache: composer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same invalid cache input issue in php-security job.
The cache: composer input is not valid for shivammathur/setup-php@v2.
🔧 Suggested fix
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer
- cache: composer📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| tools: composer | |
| cache: composer | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| tools: composer |
🧰 Tools
🪛 actionlint (1.7.10)
320-320: input "cache" is not defined in action "shivammathur/setup-php@v2". available inputs are "coverage", "extensions", "github-token", "ini-file", "ini-values", "php-version", "php-version-file", "tools"
(action)
🤖 Prompt for AI Agents
In @.github/workflows/ci.yml around lines 315 - 320, The Setup PHP step ("Setup
PHP" using shivammathur/setup-php@v2) includes an invalid input `cache:
composer`; remove that `cache: composer` line from the step and either add a
separate actions/cache step to cache Composer files or use the supported caching
mechanism documented for shivammathur/setup-php (do not pass `cache: composer`
to the action).
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php-version }} | ||
| extensions: curl, mysql, zip | ||
| coverage: xdebug | ||
| cache: composer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid cache input in disabled phpunit job.
Even though this job is disabled, the cache: composer input on line 359 is invalid for shivammathur/setup-php@v2. Fix this for when the job is enabled.
🔧 Suggested fix
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: curl, mysql, zip
coverage: xdebug
- cache: composer📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: curl, mysql, zip | |
| coverage: xdebug | |
| cache: composer | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: curl, mysql, zip | |
| coverage: xdebug |
🧰 Tools
🪛 actionlint (1.7.10)
359-359: input "cache" is not defined in action "shivammathur/setup-php@v2". available inputs are "coverage", "extensions", "github-token", "ini-file", "ini-values", "php-version", "php-version-file", "tools"
(action)
🤖 Prompt for AI Agents
In @.github/workflows/ci.yml around lines 353 - 359, The "Setup PHP" step using
shivammathur/setup-php@v2 includes an invalid input "cache: composer"; remove
that line from the step (or replace it with a supported configuration) so the
action only uses documented inputs (php-version, extensions, coverage, etc.); if
you want composer caching when the job is enabled, implement it via
actions/cache (cache composer files) rather than the unsupported "cache:
composer" input on shivammathur/setup-php@v2.
| if ( isset( $fields['general']['main']['enable_classic_editor'] ) ) { | ||
| $field = &$fields['general']['main']['enable_classic_editor']; | ||
|
|
||
| // Disable the field in UI and set to checked. | ||
| $field['disabled'] = true; | ||
| // Append Divi 4 note to existing description. | ||
| $field['desc'] .= '<br/><strong style="color: #d63638;">' . esc_html__( 'Divi 4 requires the classic editor for popup editing. This setting is automatically enforced for compatibility.', 'popup-maker' ) . '</strong>'; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add defensive check for missing 'desc' key.
The concatenation $field['desc'] .= ... assumes the 'desc' key exists. If it doesn't, this will trigger a PHP notice. Consider using a defensive check.
🔧 Suggested fix
if ( isset( $fields['general']['main']['enable_classic_editor'] ) ) {
$field = &$fields['general']['main']['enable_classic_editor'];
// Disable the field in UI and set to checked.
$field['disabled'] = true;
// Append Divi 4 note to existing description.
+ if ( ! isset( $field['desc'] ) ) {
+ $field['desc'] = '';
+ }
$field['desc'] .= '<br/><strong style="color: #d63638;">' . esc_html__( 'Divi 4 requires the classic editor for popup editing. This setting is automatically enforced for compatibility.', 'popup-maker' ) . '</strong>';
}Or more concisely:
- $field['desc'] .= '<br/><strong style="color: #d63638;">' . esc_html__( 'Divi 4 requires the classic editor for popup editing. This setting is automatically enforced for compatibility.', 'popup-maker' ) . '</strong>';
+ $divi_note = '<br/><strong style="color: #d63638;">' . esc_html__( 'Divi 4 requires the classic editor for popup editing. This setting is automatically enforced for compatibility.', 'popup-maker' ) . '</strong>';
+ $field['desc'] = ( $field['desc'] ?? '' ) . $divi_note;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if ( isset( $fields['general']['main']['enable_classic_editor'] ) ) { | |
| $field = &$fields['general']['main']['enable_classic_editor']; | |
| // Disable the field in UI and set to checked. | |
| $field['disabled'] = true; | |
| // Append Divi 4 note to existing description. | |
| $field['desc'] .= '<br/><strong style="color: #d63638;">' . esc_html__( 'Divi 4 requires the classic editor for popup editing. This setting is automatically enforced for compatibility.', 'popup-maker' ) . '</strong>'; | |
| } | |
| if ( isset( $fields['general']['main']['enable_classic_editor'] ) ) { | |
| $field = &$fields['general']['main']['enable_classic_editor']; | |
| // Disable the field in UI and set to checked. | |
| $field['disabled'] = true; | |
| // Append Divi 4 note to existing description. | |
| if ( ! isset( $field['desc'] ) ) { | |
| $field['desc'] = ''; | |
| } | |
| $field['desc'] .= '<br/><strong style="color: #d63638;">' . esc_html__( 'Divi 4 requires the classic editor for popup editing. This setting is automatically enforced for compatibility.', 'popup-maker' ) . '</strong>'; | |
| } |
🤖 Prompt for AI Agents
In @classes/Controllers/Compatibility/Builder/Divi.php around lines 171 - 178,
The code in the Divi compatibility builder assumes $field['desc'] exists when
appending a note, which can trigger a PHP notice; update the block that handles
$fields['general']['main']['enable_classic_editor'] (the $field reference inside
the if) to ensure 'desc' is set to an empty string if missing before
concatenation, then append the Divi 4 note and set 'disabled' as before so the
concatenation is safe.
| public function on_success( $entry, $form_id, $field_data_array ) { | ||
| if ( ! $this->should_process_submission() ) { | ||
| return; | ||
| } | ||
|
|
||
| // Defensive validation for third-party hook compatibility. | ||
| if ( ! is_numeric( $form_id ) || $form_id <= 0 ) { | ||
| return; | ||
| } | ||
|
|
||
| $form_id = absint( $form_id ); | ||
|
|
||
| $popup_id = $this->get_popup_id(); | ||
| $this->increase_conversion( $popup_id ); | ||
|
|
||
| pum_integrated_form_submission( | ||
| [ | ||
| 'popup_id' => $popup_id, | ||
| 'form_provider' => $this->key, | ||
| 'form_id' => $form_id, | ||
| ] | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: increase_conversion() called unconditionally may cause error.
Unlike KaliForms.php (line 130) which guards with if ( $popup_id ), this implementation calls $this->increase_conversion( $popup_id ) without checking if $popup_id is truthy. Looking at the parent class's increase_conversion() method, it calls pum_get_popup( $popup_id ) which will fail or behave unexpectedly when $popup_id is false.
Regarding the unused $entry and $field_data_array parameters flagged by static analysis: these are intentionally unused as per coding guidelines - hook callbacks should not use strict types and must accept parameters provided by third-party hooks even if unused.
🐛 Proposed fix
$form_id = absint( $form_id );
$popup_id = $this->get_popup_id();
- $this->increase_conversion( $popup_id );
+
+ if ( $popup_id ) {
+ $this->increase_conversion( $popup_id );
+ }
pum_integrated_form_submission(🧰 Tools
🪛 PHPMD (2.15.0)
120-120: Avoid unused parameters such as '$entry'. (undefined)
(UnusedFormalParameter)
120-120: Avoid unused parameters such as '$field_data_array'. (undefined)
(UnusedFormalParameter)
🤖 Prompt for AI Agents
In @classes/Integration/Form/Forminator.php around lines 120 - 142, The
on_success method calls $this->increase_conversion($popup_id) without verifying
$popup_id; update on_success to guard the call the same way as KaliForms (e.g.,
check if $popup_id is truthy) before invoking increase_conversion to avoid
passing false to pum_get_popup; keep the existing pum_integrated_form_submission
call and leave the unused $entry and $field_data_array parameters as-is for hook
compatibility.
| public function on_success( $submission, $form ) { | ||
| if ( ! $this->should_process_submission() ) { | ||
| return; | ||
| } | ||
|
|
||
| $popup_id = $this->get_popup_id(); | ||
|
|
||
| if ( ! $popup_id ) { | ||
| return; | ||
| } | ||
|
|
||
| $this->increase_conversion( $popup_id ); | ||
|
|
||
| // Extract form ID defensively - HappyForms uses lowercase 'id'. | ||
| $form_id = null; | ||
| if ( is_array( $form ) ) { | ||
| if ( isset( $form['ID'] ) ) { | ||
| $form_id = (string) $form['ID']; | ||
| } elseif ( isset( $form['id'] ) ) { | ||
| $form_id = (string) $form['id']; | ||
| } | ||
| } | ||
|
|
||
| pum_integrated_form_submission( | ||
| [ | ||
| 'popup_id' => $popup_id, | ||
| 'form_provider' => $this->key, | ||
| 'form_id' => $form_id, | ||
| ] | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Behavior differs from other integrations: skips pum_integrated_form_submission when no popup_id.
Unlike KaliForms.php and Newsletter.php which call pum_integrated_form_submission() regardless of $popup_id value (just skipping increase_conversion when false), this implementation returns early on line 130, completely skipping the form submission tracking.
This could affect analytics or other code listening to the pum_integrated_form_submission action for non-popup form submissions.
Regarding the unused $submission parameter: this is intentional per coding guidelines for third-party hook callbacks.
🐛 Proposed fix for consistency
public function on_success( $submission, $form ) {
if ( ! $this->should_process_submission() ) {
return;
}
$popup_id = $this->get_popup_id();
- if ( ! $popup_id ) {
- return;
+ if ( $popup_id ) {
+ $this->increase_conversion( $popup_id );
}
- $this->increase_conversion( $popup_id );
-
// Extract form ID defensively - HappyForms uses lowercase 'id'.🧰 Tools
🪛 PHPMD (2.15.0)
122-122: Avoid unused parameters such as '$submission'. (undefined)
(UnusedFormalParameter)
🤖 Prompt for AI Agents
In @classes/Integration/Form/HappyForms.php around lines 122 - 152, In
HappyForms::on_success the code returns early when $popup_id is falsy which
prevents pum_integrated_form_submission() from being called; change the flow so
you only skip $this->increase_conversion( $popup_id ) when $popup_id is falsy
but always call pum_integrated_form_submission([...]) with 'popup_id' =>
$popup_id, keeping the defensive form ID extraction and existing payload keys;
locate the early return that checks $popup_id in on_success and remove it,
ensuring increase_conversion remains conditional while
pum_integrated_form_submission is executed unconditionally.
| ### `.release-please-config.json` | ||
| Defines how Release Please handles this repository: | ||
| - `release-type: simple` - Basic version bumping | ||
| - `changelog-path: changelog.txt` - WordPress-style changelog file | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check actual changelog configuration and file existence
echo "=== Checking .release-please-config.json ==="
cat .release-please-config.json 2>/dev/null || echo "Config file not found"
echo ""
echo "=== Checking for changelog files ==="
fd -t f -i "changelog" --max-depth 1
echo ""
echo "=== Checking for readme files ==="
fd -t f -i "readme" --max-depth 1Repository: PopupMaker/Popup-Maker
Length of output: 614
Fix .release-please-config.json to point to the actual changelog file.
The documentation correctly reflects the current config, but the configuration itself is broken. The .release-please-config.json specifies "changelog-path": "changelog.txt", but this file does not exist in the repository. The actual changelog file is CHANGELOG.md. Update the config to use the correct path:
{
"packages": {
".": {
"changelog-path": "CHANGELOG.md"
}
}
}Without this fix, Release Please will not locate or update the changelog, causing the automation to fail.
🤖 Prompt for AI Agents
In @docs/release-please-integration.md around lines 27 - 31, The
.release-please-config.json currently points changelog-path to "changelog.txt"
which doesn't exist; update the config to reference the actual changelog file by
setting the "changelog-path" for the package entry to "CHANGELOG.md" (e.g.,
ensure the JSON includes "packages": { ".": { "changelog-path": "CHANGELOG.md" }
}); modify the "changelog-path" value in .release-please-config.json accordingly
so Release Please can find and update the changelog.
|
|
||
| - Tweak: Updated documentation links to use new docs site. | ||
| - Fix: Popup title aria-labelledby attribute was being double-quoted. Thanks to the [Equalize Digital](https://equalizedigital.com/) team. | ||
| - Fix: Popup title aria-labelledby attribute was being double-quoted. Thanks to the [Equalize Digital](https://equalizedigital.com/) team. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double space typo not fixed.
The AI summary indicates this line was corrected from "Thanks to" to "Thanks to", but the code still shows Thanks to with a double space.
🔧 Proposed fix
-- Fix: Popup title aria-labelledby attribute was being double-quoted. Thanks to the [Equalize Digital](https://equalizedigital.com/) team.
+- Fix: Popup title aria-labelledby attribute was being double-quoted. Thanks to the [Equalize Digital](https://equalizedigital.com/) team.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Fix: Popup title aria-labelledby attribute was being double-quoted. Thanks to the [Equalize Digital](https://equalizedigital.com/) team. | |
| - Fix: Popup title aria-labelledby attribute was being double-quoted. Thanks to the [Equalize Digital](https://equalizedigital.com/) team. |
🤖 Prompt for AI Agents
In @readme.txt at line 372, The README line "Fix: Popup title aria-labelledby
attribute was being double-quoted. Thanks to the [Equalize
Digital](https://equalizedigital.com/) team." still contains a double space
before "to"; update the text to a single space ("Thanks to") by replacing
"Thanks to" with "Thanks to" in the README entry (the line starting "Fix: Popup
title aria-labelledby attribute...").
Summary
Enhances the Go Pro settings tab with professional social proof, feature highlights, and contextual Pro+ pitches to improve upgrade conversion rates.
Changes
Impact
Files Changed
Testing Checklist
Related
Part of Monday release quick wins (Feature #4)
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.