Seperate plugin and theme files

You shouldn’t link directly to plugin/theme PHP files to handle requests for this exact reason – the WordPress environment won’t be loaded, hence your undefined function error. Since you’ve implemented a shortcode-approach to integrate with the theme, you could just point the form to itself (i.e. remove the action attribute) and then dynamically handle the … Read more

Unable to create a Rest end-point

As of WordPress 5.5, register_rest_route()‘s permission_callback argument is required. You should be receiving/logging an error message to the effect of PHP Notice: register_rest_route was called incorrectly. The REST API route definition for /search-cert is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. … Read more