Skip to content
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

Popup Maker Plugin does not display random popups due to String-Integer comparison Issue #13

Open
shien opened this issue Feb 27, 2024 · 0 comments

Comments

@shien
Copy link

shien commented Feb 27, 2024

Hi, contributors

I have encountered an issue with the Popup Maker plugin where popups intended to display randomly are not appearing as expected. Upon investigation, we identified that the root cause of this issue is a comparison operation between string and integer values, which prevents the code from entering the necessary conditional branch to execute the random popup display logic.

I checked below document.
https://docs.wppopupmaker.com/article/313-a-b-test-or-randomly-display-popups

Steps to Reproduce:

  1. Configure the Popup Maker plugin to display popups randomly in "Simple Custom CSS and JS".
  2. I create three popups I want to show randomly.
  3. Trigger the condition that should display each popups.
  4. Observe that the popup does not appear.

Expected Behavior:
Randomly configured popups should appear when their specified conditions are met.

Actual Behavior:
Popups configured to display randomly do not appear due to the failure of a conditional check caused by comparing a string to an integer.

Below ID value is string.

ID = $this.popmake('getSettings').id;

Proposed Solution:
The issue can be resolved by converting the string value to an integer before performing the comparison.

e.g.

ID = parseInt($this.popmake('getSettings').id);

Additional Information:

Popup maker Version: 1.18.2
Browser(s) Tested: Chrome
WordPress Version: 6.4.3
Simple Custom CSS and JS: 3.46

May I create pull request above issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant