Grab ID from post from plugin and use it to create an object
I have this code within a plugin and I want to grab the ID of the custom post being showed: … “here” is in the same file that classes are created in the main file of the plugin: class Product { } $x = new Product($id); //here You can’t do that. The “custom post being … Read more