-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Describe the bug
When descriptions are being imported, we're relying on the configured endpoint configured in the plugin to fetch the results instead of the provided URL passed into the wp cli command. Based on what we end up doing with this issue added to the UCF-Degree-CPT-Plugin, we may want to update the hook to use the provided API endpoint and key.
However, with this particular issue, there is no need to go out to the search service at all if the description type has already been saved into the plugin settings. We should be able to update the code to get the description type id from the plugin settings and then immediately get the description from the $program variable.
Steps to Reproduce
- Update the URL and/or API key configured in the plugin invalid.
- Run the WP CLI command pointing to a functional API point.
Expected Behavior
There will be no catalog descriptions as the configured endpoint is invalid.
Possible Fix
Update the hook to get the description type id from the plugin settings - using these lines only if there isn't a setting configured - and then move onto retrieving the description from the $program variable.