I have started worked on this ticket, Once I am done with this will let you know for the same.
Plugin Directory
I have seen in other plugins where they advertise their premium extensions in what almost looks like a shopping cart built into a page in their plugin. I would like to do this here so that we can get our premium extensions shown to the people using the free plugin.
Official response
Comments (46)
-
-
Below is zip file path which you I need to put on your live server to get all the product detail.
http://ipntesting.projectsmd.in/api.zip
Step 1: Extract api.zip file and put it on your root path of https://www.angelleye.com/
Step 2: Open /api/getinfo.php file and set WooCommerce API Keys 1)Consumer Key 2) Consumer Secret for more info see the video http://screencast.com/t/smpM0RbldNMe
Step 3: Url should be https://www.angelleye.com/api/getinfo.php or let me know new one.
I will used this information https://www.angelleye.com/api/getinfo.php and display premium extensions.
Let you know if any query or suggestion for me.
-
Plugin Directory, ref
#51→ <<cset 02fc49c67a43>>
-
change URL, ref
#51→ <<cset eb9bf6452530>>
-
remove class, ref
#51→ <<cset 6977164d4485>>
-
reporter I have followed your instructions except that I placed the files in a different place. Currently, they are located at https://www.angelleye.com/web-services/woocommerce/api/getinfo.php
It seems to be loading and returning data from what I can see.
-
reporter Do I need to use a particular category or tag for the premium extensions so you can easily pull them out of the feed that WC returns?
-
Here https://www.angelleye.com/web-services/woocommerce/api/getinfo.php I need short and sweet product information but this display all the information with html tag. so it will break design on PayPal IPN premium extensions.
I think I need to used short description like below:
short_details
Also you need to change one line on web-services/woocommerce/api/getinfo.php
line No: 24
$product_array[$key]['description'] = $addon->description;
to
$product_array[$key]['short_description'] = $addon->short_description;
let me know your suggestion for the same.
-
below is product short detail section:
-
reporter Ok, I made the change to the getinfo.php file.
-
Almost I am done, just need to change one thing:
In the premium extensions section we need to display only premium extensions product not all the product, for that you need to create like "premium extensions" or any thing that you like and then assign to that specific product which you want to display on premium extensions section.
below are code that you need to change on : https://www.angelleye.com/web-services/woocommerce/api/getinfo.php file.
$addons = json_decode($client->products->get($id = null, array( 'filter[category]' => 'CATEGORIES NAME' ))->http->response->body);
just replace CATEGORIES NAME to you created categories name.
let me know if any query.
-
reporter Is it possible to pull data based on a post tag instead of the category?
-
Currently WooCommerce rest api support product filter only "type", "category", "sku" and "category".
There is no filter is available for post tag in the WooCommerce rest api.
let me know your suggestion for the same.
-
reporter So if we go with category do I need a separate category for every plugin that has premium extensions? You mentioned a single category caled "Premium Extensions" but then that would pull all extensions for all plugins wouldn't it?
So would I need separate categories like "PayPal IPN for WordPress Premium Extensions" and "Offers for WooCommerce Premium Extensions"? And then if so, we would need to dynamically pull the details in the getinfo.php..??
-
reporter I wonder if WooCommerce API has been updated by now to include what I was originally wanting..?? Can we pull products based on a tag now, by chance?
-
Plugin Directory, ref
#51→ <<cset bf42eca09a08>>
-
changed set_transient time, ref
#51→ <<cset 26685cc65a46>>
-
- attached api.zip
-
I have attached latest api.zip file, Can you please remove https://www.angelleye.com/web-services/woocommerce/api/ folder and used above api.zip file.
Also you need to change below values:
define('YOUR_STORE_URL', 'https://www.angelleye.com/'); define('CONSUMER_KEY', 'ck_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); define('CONSUMER_SECRET', 'cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); define('PRODUCT_TAG_NAME', 'premium_extensions');
-
reporter - changed version to 1.1.0
-
reporter -
assigned issue to
-
assigned issue to
-
reporter I have updated the /api folder on angelleye.com with the version from the zip above.
I have also created a new set of keys and updated the values in the getinfo.php file.
-
reporter This is working, but not perfectly.
- It's pulling in the products that I have tagged accordingly, so that's good. It is not pulling the featured image for the product, though, so this is what I end up with:
- The tag I'm using is "premium_extension" which is working, but in the future we will have premium extensions for more than just our IPN product. For example, we will also have premium extensions for our Offers for WooCommerce plugin, and we don't want extensions for Offers showing up in the IPN plugin or vice-versa.
I think we're going to need to update our getinfo.php service running on angelleye.com to allow for dynamic tag values to be passed to it as opposed to setting a static value of "premium_extension" for the tag. This way we use tags like "offers_premium_extension" and "ipn_premium_extension" to separate them.
If you have a better solution that's fine, but we need to address this one way or another.
-
reporter Along with the image, we should pull the short description so we can display that as well.
-
- attached api.zip
Latest API
-
I have updated api.zip file, please assign CONSUMER_KEY and CONSUMER_SECRET value and let me know.
-
reporter I've made the adjustments.
I see that you're using $_GET['tag'] now, but I don't see how that's getting sent to the service..??
When I load the Premium Extensions tab in the plugin now it pulls various products, but I'm not even sure how it's deciding what to pull at this point..??
It shows the description now, but still no image.
-
reporter Adjust verbiage and URL, ref
#51→ <<cset 561074eda8fd>>
-
reporter I tried adjusting the $addons_json variable to include the URL parameter on the endpoint...
$addons_json = wp_remote_get('https://www.angelleye.com/web-services/woocommerce/api/getinfo.php?tag=ipn_premium_extension');
It's still returning the same random products, though. Not sure how/where we're supposed to pass the URL parameter to getinfo.php at this point..??
-
reporter It's also not working now if I edit getinfo.php directly...
$addons = $woocommerce->get('products', array('filter[tag]' => 'ipn_premium_extension'));
I do have two products currently setup with that tag, so I'm confused.
-
Yes, you are right. Atually we are storing data in the transient . it will refresh data after one hours to reduce server request.
-
Plugin Directory, ref
#51→ <<cset d86595612493>>
-
Plugin Directory, ref
#51→ <<cset 9e82af3115bc>>
-
- changed status to resolved
-
-
reporter - changed status to closed
-
reporter Updates changelog, ref
#51→ <<cset 7920a7863f31>>
-
reporter Updates tab label, ref
#51→ <<cset d4fdea8f86a0>>
-
reporter Updates label, ref
#51→ <<cset b6a74dcf52fa>>
-
Issue
#95was marked as a duplicate of this issue. -
- attached api.zip
Latest zip file
-
@angelleye
I have updated latest zip file: https://bitbucket.org/angelleye/paypal-ipn-for-wordpress/issues/attachments/51/angelleye/paypal-ipn-for-wordpress/1505378274.47/51/api.zip
Also you need to change below values:
define('CONSUMER_KEY', 'ck_******'); define('CONSUMER_SECRET', 'cs_*****');
please remove old api folder https://www.angelleye.com/web-services/woocommerce/api/ and unzip latest zip file
-
- changed status to open
-
- attached api.zip
-
- changed status to resolved
-
reporter - changed status to closed
- Log in to comment
Latest zip file