Skip to content

Update Catalog Description Import #190

@jmbarne3

Description

@jmbarne3

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

  1. Update the URL and/or API key configured in the plugin invalid.
  2. 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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions