0

I have created a plugin in wordpress. I am making a cURL request to the server and server response is coming to new index.php. Which is in my_plugin/newfolder/newfolder/index.php.

Now from the server side it post the response to my_plugin/newfolder/newfolder/ but it makes problem to other workflows in my application. So I have to handle the post response URL to my_plugin/newfolder/newfolder with out slash from my plugin.

How can I do this? I have checked flush_rewrite_rules but it is not helping me.

Please help me into this.. Your Help is appreciated.

0

plugin_dir_url( __FILE__ ) will return the URL of the current files directory. Usage would be:

$url = plugin_dir_url( __FILE__ ) . '/newfolder/newfolder/index.php';
| improve this answer | |
0

You can use the method mentioned by Eric or can create a Custom menu with some Url in your Custom plugin.

Just write all your code in that menu to get data returned by the curl request.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.