Make sure your site is pointing to your test env of wpjobmanager.com. You can do by setting the constant JOB_MANAGER_DEV_API_BASE_URL to the base URL of your local WPJMCOM instance in your wp-config.php. For instance:
Make sure you don't have a license activated in your local WPJM site. You can always reset all the WPJM licenses in a site by using wp option delete job_manager_helper.
Navigate to the Licenses page: /wp-admin/edit.php?post_type=job_listing&page=job-manager-marketplace§ion=helper. It should show you something like this:
Click on the "Activate License" button to initiate the process
If:
9.1. There's an error, you should see this:
9.2. If the process was successful, you should see this:
Also make sure the normal license activation and deactivation continue working properly.
Revert the changes above
Buy a WPJM Addon on your local wpjobmanager.com site.
Try to activate and deactivate the license through your WPJM site, and make sure it works properly.
Fixes https://github.com/Automattic/wpjobmanager.com/issues/721
Changes Proposed in this Pull Request
Testing Instructions
JOB_MANAGER_DEV_API_BASE_URL
to the base URL of your local WPJMCOM instance in yourwp-config.php
. For instance:(you can change the slug of the addon if you want, but please change it as well in the next steps)
class-flush-wpcom-activation-endpoint.php
(added in the PR linked above): 5.1. Update the access token as described in the step 8 in https://github.com/Automattic/wpjobmanager.com/pull/724 5.2. Comment this line because your local site won't exist on WPCOM: https://github.com/Automattic/wpjobmanager.com/pull/724/files#diff-a4f394b8eec10682db698affd6bffeab207386eb4581b0eb937a69568284c861R167 5.3. Create an ownership as described from steps 1 to step 5 in https://github.com/Automattic/wpjobmanager.com/pull/724, and hard-code the value of$wpcom_marketplace_ownership_id
to match the ownership ID you just created.wp option delete job_manager_helper
./wp-admin/edit.php?post_type=job_listing&page=job-manager-marketplace§ion=helper
. It should show you something like this:Also make sure the normal license activation and deactivation continue working properly.
Context
This is akin to the PR in https://github.com/Automattic/sensei-pro/pull/2529