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

SiteGen not working Issue #123

Merged
merged 3 commits into from
Nov 21, 2024
Merged

Conversation

officiallygod
Copy link
Member

@officiallygod officiallygod commented Nov 21, 2024

Proposed changes

In the Bluehost Release 3.15.4, Onboarding Data went live from 1.2.1 to 1.2.3
Change 1: Link, Change 2: Link

With this, the change

// Only fetch capabilities in the admin when a user is logged in
if ( ! is_admin() || ! is_user_logged_in() ) {
return false;
}
went live as well, and Onboarding Sitegen API calls stopped working as is_admin() always returned false. It is being called here:
return isset( Data::current_brand()['config']['enabled_flows']['sitegen'] )
&& true === Data::current_brand()['config']['enabled_flows']['sitegen'];

So I am removing this check as the user will have SiteGen Enabled if they ever reach this page and the capability will be checked again in the module-ai side as well, Ref.

Type of Change

Production

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update
  • Refactoring / housekeeping (changes to files not directly related to functionality)

Development

  • Tests
  • Dependency update
  • Environment update / refactoring
  • Documentation Update

Video

Checklist

  • I have read the CONTRIBUTING doc
  • I have viewed my change in a web-browser
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@officiallygod officiallygod merged commit acec6b8 into main Nov 21, 2024
3 of 6 checks passed
@officiallygod officiallygod deleted the fix/sitegen-not-working-issue branch November 21, 2024 09:12
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

Successfully merging this pull request may close these issues.

2 participants