Need to get User Subscription in PHP
Author | Posts |
---|---|
June 30, 2015 at 2:24 pm 53726 | |
Bradley | I Posted this earlier but have been away and the topic was closed. - Hi, I need to get the Subsciption Package of a Seller. We have 3 subscriptions Silver, Gold, Elite If the User has an ELITE subscription I need to show the Reports tab if ‘else’ (any other or NO subscription) hide the Reports tab. I need this similar to the standard wordpress ‘is_user_logged_in()’ and ‘current_user_can()’ I found this on your forums ‘_wpuf_subscription_pack and a parameter inside that named pack_id’ but am having troubles impmlementing it into this code ‘if ( is_page(‘reports’) && ! is_user_logged_in() && ! [need subscription package check here] ) { This way I can show only certain tabs to certain user roles or users with a certain subscription. Basically - I need Wordpress to Check the subscription of a user before 'echoing' a statement (in this case a menu item on the dashboard) if the user's subscription is not XYZ then it echo's something else (in this case nothing at all just hides the item) Thank you. |
July 1, 2015 at 12:28 pm 53868 | |
towhid | Hello Bradley, To avail this kind of addition you have to customize the plugin. But I am really sorry to say that we do not provide any customization services. If you need this option very urgently you can hire a developer you can do the customization on your own if you know how to programming. Thanks |
July 1, 2015 at 1:15 pm 53877 | |
Bradley | Hey Towhid. Thanks for getting back to us. Can you give some direction on where to start with the customisation? OR Is it possible to assign subscription packs from your subscription plugin specific WordPress user roles? I appreciate your help in this matter. As I said, any direction would be greatly appreciated. Thank you. |
July 1, 2015 at 1:52 pm 53884 | |
Bradley | While your at it, if this ‘customisation’ (which I don’t believe is really customisation – just asking if you have a hook or filter I can jump on) has to be handled with alterations of Core Dokan Plugin Files. Can you please give me instructions on setting up a Template Hierarchy so I am not screwing myself next time your Plugin needs to be Updated. Again, Any Help would be Greatly Appreciated. Thank you. |
July 4, 2015 at 9:42 am 54179 | |
towhid | Hello Bradley, Try the following documentation which has the list of actions and filters. Try the following documentation which depicts how to create a child theme without alternate the core theme. Thanks |
July 4, 2015 at 10:09 am 54181 | |
Bradley | Hi Towhid. Thank you for your help on this matter. We are using the DOKAN PLUGIN not the DOKAN THEME. We are using a custom theme and have already setup a child theme for code. Is there a Template Structure that the DOKAN PLUGIN uses (not the theme) so that we can modify the Plugins files without affecting the core DOKAN PLUGIN files. How I would imagine this working is similar to the WOOCOMMERCE PLUGIN that Dokan Utilises.
What I am asking is if the DOKAN PLUGIN also has a similar template hierarchy setup. |
July 4, 2015 at 10:11 am 54182 | |
Bradley | Is it possible to wrap this code in a filter which checks what subscription (Dokan Subscriptions Plugin) a user has?
|
July 6, 2015 at 12:57 pm 54413 | |
towhid | Hello Bradley, To customize the Dokan templates, you have to make a folder named dokan inside your theme folder and place files in it. Like the store.php file is now located inside “wp-content/plugins/dokan-plugin/templates” folder. Thanks 🙂 |
July 13, 2015 at 12:03 pm 55392 | |
Bradley | Thank you thats great. I have yet to try this but im sure it will work. Thank you. |