How can I detect if user has already bought a memberpress product. I’m searching something like this: Answer This should be pretty straight forward using MemberPress’ built in capabilities: MemberPress also adds capabilities for each MemberPress Membership so you could also do something like this: In the second example the number 123 is the id of the MemberPress membership.
Tag: wordpress
How can I make an ad visible only to mobile users?
I want to use some mobile ads but my website has responsive design so I don’t use the m. subdomain. How can I make an ad visible only to mobile users? What about only to desktop or tablet? I’m using wordpress as a CMS. Thanks, Answer It’s quite easy using CSS3 Media Queries. In your CSS: For bigger devices, hide
WooCommerce: Change priority of tabs by number of product ratings
I have this code that set reviews tab to show first before item description. Its works fine, But i want to set it to do it only if the number of reviews high from 0. Something like : Is there any hook/ function / filter to get number of product reviews? Thanks. Answer reviews in woocommerce is just comments in
wordpress permalink redirect to home page if there have any unicode characters
i have a client who recently change his host server and face a werid problem. i belive it’s all happend for unicode characters. Ex: http://example.com/wp-content/uploads/2014/07/dog-meghivo-430×430….
WooCommerce – How to get shipping class of cart items in calculate_shipping function?
I have created a WooCommerce plugin that enables free shipping for subscribers. It seems to have broken following a recent WooCommerce upgrade. Specifically, the problem seems that the shipping class of the cart items may not be being retrieved correctly. Here is my calculate_shipping code – can anyone advise what is wrong? UPDATE I’ve looked at the %package array and
WordPress custom field outside of loop
I currently have a banner image on a site which is pulled in via the featured image. The code below that does this works: I would like to change this to use a custom field instead via Advanced Custom Fields. I have made a custom field called banner_image with the type as image url. I cannot seem to get this
Broken links after moving wordpress site
I moved my wordpress site from local host to a live server. The problem is that all links from my nav won’t work as the home button. live site url: http://iulian.cablevision.ro broken link example: http://iulian.cablevision.ro/about/ this is the error that i get: I tried to use the a comand in SQL on my database to update urls: And I also
How to move the WordPress webpage to other hosting servers?
Crrently I am trying to moving my wordpress website to new paid hosting service godaddy. It is a wordpress managed hosting. I have gone throgh a lot on internet on moving wordpress from one host to other host. The suggested duplicator plugin was not working for me. Finally, I tried the follwing:- Assume that my old website name is My
WordPress – Adding to Redux Theme Options using Child Theme
I am using a wordpress theme that has it’s own framwork which is based upon redux framework I think. I am modifying this theme using a child theme. I want to add to the Theme Options in the backend …
update_order_review( ) on button click
I have a custom button on my checkout page, on click I’m adding a product to cart via AJAX. JS: PHP: After that, I’d need to refresh the order review, so it displays my newly added product also. How can I do that? Answer All you need to do is call a trigger on the body to update the cart.