Skip to content

Load snapchat assets on any wp-admin route#56

Open
AlejandroPerezMartin wants to merge 1 commit intotrunkfrom
fix/SNAPWOO-74-snapshat-routing-error
Open

Load snapchat assets on any wp-admin route#56
AlejandroPerezMartin wants to merge 1 commit intotrunkfrom
fix/SNAPWOO-74-snapshat-routing-error

Conversation

@AlejandroPerezMartin
Copy link
Collaborator

@AlejandroPerezMartin AlejandroPerezMartin commented Feb 12, 2026

Changes proposed in this Pull Request:

Loads Snapchat for Woocommerce assets on /wc-admin routes to make SPA navigation work.

Since WooCommerce routes use JavaScript-based navigation, the PHP logic that checks the current route to load Snapchat assets doesn't execute when navigating from one WooCommerce subpage to another. As in the Google for Woocommerce plugin, the assets should be loaded under any Woocommerce route.

Closes https://linear.app/a8c/issue/SNAPWOO-74/error-loading-main-plugin-page-from-menu

Screenshots:

Detailed test instructions:

Important: You need to use a publicly accessible URL e.g. Ngrok; local URL's (e.g. woo.test) will not work.

  1. Have both the Google and Snapchat for Woocommerce plugins installed
  2. Go to Marketing > Overview in the admin
  3. Navigate to Marketing > Snapchat
  4. There shouldn't be a routing error ('Not allowed' message) anymore

Additional details:

Changelog entry

Prevent adblockers from blocking auto-generated images in the preview

Fix routing navigation within the Woocommerce plugin admin

@AlejandroPerezMartin AlejandroPerezMartin self-assigned this Feb 12, 2026
@github-actions github-actions bot added the status: e2e tests passing E2E tests are passing on the PR label Feb 12, 2026
@ankitguptaindia
Copy link
Collaborator

QA Status: ✅ Fixed

=== Environment

  • WordPress: 7.0-beta6-62094
  • PHP: 8.3.23
  • Server: nginx/1.26.1
  • Database: mysqli (Server: 8.0.35 / Client: mysqlnd 8.3.23)
  • Browser: Chrome 146.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.4
  • Plugins:
    • Force GLA Billing Status to Approved 1.0
    • Google for WooCommerce 3.5.2
    • Snapchat for WooCommerce 1.0.2
    • WooCommerce 10.6.1
    • WooCommerce Beta Tester 3.0.0

Test Results: The issue has been resolved. The “Sorry, you are not allowed to access this page” warning is no longer appearing. I tested across multiple scenarios, including navigating through other plugin tabs and the Overview tab, and everything is working as expected.

Recording.1758.mp4

@ankitguptaindia ankitguptaindia self-requested a review March 24, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: e2e tests passing E2E tests are passing on the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants