Dynamic Parameter for Wordpress plugin

0

I need to send a parameter to my plugin , this parameter is the path of that user's folder.

Variable example:

$folder = /clientes/id_1/
$folder = /clintes/id_2/
$folder = /clientes/id_3/

These folders are generated automatically, each client has its own, that's my problem, I need to send this variable with the folder path to my plugin save this in session but I have no idea how to do that.

I was trying to get an AJAX request, right to the root file of my plugin passing the variable $folder by method GET , but it is not working.

Note: I do not want to mess with the Woord / Woocommerce files, I need to reuse% s of the files themselves in order to keep Thema / WP updates.

    
asked by anonymous 15.12.2014 / 16:18

1 answer

0

Well, I could not find a more viable solution than sending a request to a second file inside my plugin (When I sent it to the main it returned an error, so I tried to send it to a secondary file with no link to the principal), responsible only for setting the session.

I'm sure it's not the right way to work, but that's what I was able to do to solve my problem ...

If someone knows a better way to do this, feel free to share the knowledge.

    
16.12.2014 / 18:55