after 2 week i’m here.
my first payment plugin did accept by Wordpress code review team and for now i’m a little busy for my new project.
new project is for Tezos network it’s a concept, the new one is harder than older and i think my skills did grow on it :D
ok let’s talk about how make payment plugin in part 2 :)
in last part we did speak about how make a wordpress plugin.
in this part we will talk about shortcode.
first step i will refer you to official wordpress document : shortcode
i did this because i don’t want to give a fish to you. you must to learn how find you problem answer.
and if you have problem with official document you must to learn to use it.
for now let’s to explain shortcodes more.
did you ever seen something like this ?
in wordpress, developers can do a lot of things with shortcodes.
in this plugin we must to handle a page refer user after any update of payment (success or fail).
we haven’t access to make a route (with installed template) in plugin.
i’m using shortcode to make a redirect page for payment. like this picture :
so i’m bad to explain things without sample. let’s talk about how we can made on of them.
it is tooooo much easy.
just we need to call a wordpress function and a function as a callback.
watch this :
it’s realy easy.
so now we have a shortcode and we can put in on our post or page like this :
if you want to refer callback to a class (playing with oop in wordpress ) just put array to callback place like this : +
it’s too much easy. don’t afraid to make a plugin and test it on your own local wordpress site :)
in next part we will talk about RestApi. there is to much things to say.
if you like start to make a plugin but u need help, don’t afraid to contact with me