WooMinecraft / woominecraft-wp

A FREE Minecraft Donation Plugin for WordPress designed to work in conjunction with WooMinecraft for Bukkit/Spigot & WooCommerce to allow the purchasing of virtual items in MineCraft and have them delivered to the servers.
https://wordpress.org/plugins/woominecraft/
GNU General Public License v2.0
31 stars 14 forks source link

Check for permissions before purchase? #61

Closed Peda1996 closed 3 years ago

Peda1996 commented 4 years ago

I would like to implement a way of checking whether a user has already the needed permission on the spigot server before buying a certain product. For this reason, I want to set up a small rest-client on the bukkit/bungee side. This has also the advantage, that the WordPress installation could directly call the spigot server when a purchase was made (so no waiting is needed).

My biggest concern is, that I don't really know how to implement this into the woocraft wordpress plugin.

Anyone got ideas?

ethsmith commented 4 years ago

@Peda1996 I suggest making a ticket on the wordpress part. Also, this is possible, would take a bit of changing to the communication process but not the hardest thing in the world. I assume you are doing this for rank upgrades, since no one within their right mind would buy a product a second time if they knew they already bought it. WooCommerce Smart Coupons plugin could probably be a way to do this by giving coupons after a player buys a specific rank. Sorry I took so long to respond. I don't actually work on this project anymore but I see no one else said anything.

JayWood commented 4 years ago

WordPress has a function called wp_remote_get() or wp_remote_post() to get or post data to literally any URL. THat should get you started. Barring that, I'd take a look through the WordPress source as well. You're going to need to know PHP at minimum.

JayWood commented 3 years ago

Closing due to inactivity.