Automattic / WP-Job-Manager

Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
https://wpjobmanager.com
GNU General Public License v3.0
893 stars 366 forks source link

Repair edit job listing screen. #2802

Closed gikaragia closed 2 months ago

gikaragia commented 2 months ago

Oveview

This fixes an issue to the edit job listing screen. To reproduce:

  1. Create a job and publish it
  2. Set up a recaptcha and enable it in the settings (any version will do, go to https://www.google.com/recaptcha to create keys if you don't have some already)
  3. Go to the job dashboard
  4. Edit the job
  5. After doing some change try to save the listing
  6. At this point the update fails and nothing happens

The problem was that we added the actions to the WP_Job_Manager_Recaptcha constructor. This way the hooks were added even when we wanted to call utility methods and the captcha was also enqueued to the dashboard page.

Changes Proposed in this Pull Request

Testing Instructions


Plugin build for 42aae9cb2f587f2da93c4d5984a20c00db365607
📦 Download plugin zip
▶️ Open in playground