Skip to content

Remove hardcoded Zapier webhook URLs#37

Open
jgalea wants to merge 1 commit intodevelopfrom
fix/zapier-webhook-urls
Open

Remove hardcoded Zapier webhook URLs#37
jgalea wants to merge 1 commit intodevelopfrom
fix/zapier-webhook-urls

Conversation

@jgalea
Copy link
Copy Markdown
Collaborator

@jgalea jgalea commented Apr 28, 2026

Summary

Two Zapier webhook URLs were hardcoded into the plugin source:

  • includes/admin-plugins.php:29 — POSTed plugin-deactivation reason + installed-addon list from a Vue feedback modal on wp-admin/plugins.php
  • includes/functions.php:409 (wprss_sub_to_newsletter) — POSTed name + email from the post-activation newsletter signup form

Both upstream Zaps have been deactivated, so the URLs are dead in production. They remain visible in shipped source though, which is what this PR cleans up.

What's removed

  • includes/admin-plugins.php and its Vue source (js/src/modules/plugins/, css/src/plugins/). The feedback modal was the only consumer of the URL and the only purpose of the file. With the Zap gone, the modal was a no-op that submitted to a dead endpoint. Removing it makes Deactivate on the plugins page work the way core WordPress intends — direct deactivation, no modal, no follow-up prompt.
  • The plugins entry from webpack/webpack.vue.js so plugins.min.js / plugins.min.css are no longer built.
  • The require_once(WPRSS_INC . 'admin-plugins.php') line from wp-rss-aggregator.php.

What stays

wprss_sub_to_newsletter($name, $email) is kept. The hardcoded Zapier URL is replaced with a filter (wprss_newsletter_subscribe_url) that defaults to an empty string. When empty, the function returns false without making a request and logs an info message. Callers (admin-intro-page.php) ignore the return value and still show the success notice, so end-user UX is the same.

This way the function still has somewhere to land if a new endpoint is wired in later, but the dead URL doesn't ship.

Testing

  • php -l passes on includes/functions.php and wp-rss-aggregator.php.
  • grep -rn "hooks.zapier" --include="*.php" --include="*.js" --include="*.scss" . returns no matches.
  • grep -rn "admin-plugins\|wpra-plugins\|plugins.min" --include="*.php" --include="*.js" . returns no matches.

Notes

  • Diff is +13 / -506 (the deletions are mostly the SCSS and Vue files that supported the dead modal).
  • No data-collection behaviour change for users on a current install: both endpoints were already silently failing.

Two endpoints baked into the source had been disabled upstream:

- includes/admin-plugins.php — Vue-driven plugin-deactivation feedback
  poll on wp-admin/plugins.php. Localized the Zapier URL as
  WrpaDisablePoll.url and POSTed deactivation reason + addon list to
  it. The Zap is gone, so the modal was a no-op that still made the
  URL discoverable in shipped source.

- includes/functions.php — wprss_sub_to_newsletter() POSTed name +
  email to a different Zapier hook from the post-activation intro
  page. That Zap is also gone.

Drop admin-plugins.php and its Vue/SCSS sources entirely. The feature
was tied to the dead endpoint and the `Deactivate` link on the plugins
page now works as core WordPress intends — no modal, no follow-up
prompt. Also remove the `plugins` entry from webpack/webpack.vue.js so
plugins.min.js / plugins.min.css are no longer built.

Keep wprss_sub_to_newsletter() but route the URL through a new
`wprss_newsletter_subscribe_url` filter that defaults to empty. When
empty, the function returns false without making a request and logs an
info message. Callers (admin-intro-page.php) ignore the return value
and continue to show the success message, so end-user UX is unchanged
from the current state. Sites that want to wire a new endpoint can
hook the filter.
@jgalea
Copy link
Copy Markdown
Collaborator Author

jgalea commented Apr 28, 2026

This is the source-level fix for the same issue tracked in the v5 monorepo at RebelCode/wpra#649 (build-pipeline patch tracker at RebelCode/wpra#677). Once this lands on develop, the Makefile patches in wpra#677 become unnecessary.

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.

1 participant