I found an acceptable solution to my problem. The solution has a few steps:
-
I used
.htaccess
to deny direct access to the emoticon files for everybody -
I created a simple PHP file in the plugin folder. The PHP file acts as a proxy for the images (I pass it the path to the emoticon via a GET parameter). Since the PHP file does not include the whole WordPress infrastructure the proxy works very fast. I also do a very basic check of a cookie (
emoticon_set_name=md5(emoticon_set_name)
) -
In the WordPress plugin I use the
init
action to set the cookie values according to the emoticon sets that the user bought.
The MD5 encryption can be substituted for any kind of encryption and the cookie value encrypted can be combined with other cookie values to make it more difficult for the user to directly key in the cookie in the browser.
Related Posts:
- How do I create a custom role capability?
- Edit or Remove Plugin .htaccess Using The Admin Panel
- WooCommerce get Shipping Class of product from either the product id or the order after order is completed
- How to iterate through custom posts and add the title to an array
- Add rewrite rule in plugin: with .htaccess in plugin folder or using WordPress functions
- Removing rules from .htaccess
- Pages 404 in wordpress
- product-attribute-slug-is-too-long-28-characters-max
- Custom user profile, registration, login page with theme
- get all products of one category
- Woocommerce add custom button to backend order table
- Plugin vs Settings load order (woocommerce dependency)
- How do I hook a custom discount to change a WC_Order price total on WooCommerce?
- Does WP Have a Function To Generate .htaccess RewriteCond?
- Add multiple shipping rates from add_rate function with custom ID
- set_sale_price in WooCommerce [closed]
- Why is the reset password key missing in the reset password email?
- Error “Call to a member function switch_to_locale() on null” during insert_with_markers
- Woocommerce – Hide a Column in Cart Table
- Print value of an array or variable in a payment plugin
- How to get orders with used coupon in WooCommerce
- How to update total price of completed order in woocommerce? [closed]
- Plugin development: get_post_meta is not working [closed]
- $wpdb -> Batch insert from XML File?
- How to get the ID of the currently logged in user?
- Check if someone is editing a post (this content is currently locked)
- How do I change the initial quantity of a product in woocommerce?
- Order properties should not be accessed directly
- How to check if Woocommerce Order number equals to post ID?
- How do I add custom column to woocommerce cart?
- How plugins_loaded works?
- WooCommerce Conditional Tag inside plugin
- Custom attribute type not displaying terms in edit product – WooCommerce
- Append country to ‘pretty’ url but serve same page
- WooCommerce registration password field not displaying
- Show special field when correct shipping is chosen
- update woocommere total value on checkout based on selected payment method
- Modifying the default WordPress .htaccess with a plugin
- how to add custom functionality after woocommerce place order button
- WooCommerce Admin Reports : Get custom product report based on date range
- Adding a brand column to WooCommerce Products
- Woocommerce checkout update totals with datepicker
- Strange issue saving custom field data for a WooCommerce order
- PHP – Extend WordPress Woocommerce Revenue Analytics with custom field
- Woocommerce – Convert Delivery method into a custom field
- “import declarations may only appear at top level of a module” when importing WooCommerce API node module
- Woocommerce extend tax report with custom column
- How can we display product price $104 on the cart while the credit card payment method is checked?
- Show disclaimer with accept button before redirecting to the payment gateway website
- How do I apply a custom discount to individual product total prices depending on their categories on the cart and checkout pages of WooCommerce? [closed]
- In woocommerce cart item we can add custom text but how can i add custom link? [closed]
- Updating Woocommerce Settings API when WordPress Settings API saved and vise versa
- Can’t get woocommerce_get_price_html to work [closed]
- How to extend WooCommerce API to show bookable product availability rules?
- Customize WooCommerce my account dashboard through plugin
- woocommerce_checkout_order_processed hook executing function twice
- Is there a way in which I can compare product id with the order id to display content on front end before placing the order? [closed]
- Woocommerce Composite Products – Add a composite product to cart programmatically via ajax [closed]
- Redirect to another page using contact form 7? [closed]
- Change WooCommerce Email Header using custom plugin
- UWooCommerce – add cart discount programmatically?
- Remove an action by extending class and replacing it
- Woocommerce order empty items array
- How to get all product in the woo-commerce? [closed]
- How can I create a custom plugin that allows anonymous users to signup without registering?
- Woocommerce inventory [closed]
- WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]
- How to change WooCommerce loop product title HTML output in single product page and archive page
- Can woocommerse be used dynamically for billing from another plugin for payment processing?
- Sending an SMS on new order placed – WooCommerce
- Can we use a library under MIT license in a WooCommerce plugin?
- Set _regular_price 0 if empty in woocommerce product
- WooCommerce Endpoints content
- How to remove city field from order in dashboard?
- How to only Load scripts on variable products page
- How to design WooCommerce-like admin tabs for plugin settings page?
- Woocommerce: block user removing cart item
- how do I find out if a placed order was deleted or trashed? [closed]
- What is the meta_query key name for the woo product average rating? [closed]
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- Return custom product in ajax call loop
- WooCommerce adds a newline symbol (\n) between email recipients
- Allow HTML in product attributes and variation for WooCommerce
- How do I add multiple custom menu Woo-commerce my account page?
- High-Performance Order Storage conflict action `manage_shop_order_posts_custom_column`
- I want to redirect user to an amazon product page from my wordpress website when they add product to there cart [closed]
- Custom fields in the billing address section woocommerce
- how to works woocommerce cart hash
- Add File field in WooCommerce Box office plugin
- Woocommerce Payment Plugin with Mycred being the payment processor
- Sticky bar with filter button and product count
- All Pages and Post are redirecting to 404 Not Found in wordpress
- Woocommerce Reviews tab not showing on single product page
- Get logged in user with – custom plugin
- WordPress Cron Job not importing products
- WP_List_Table sortable column with WC_Order_Query doesn’t work
- Resending woo-commerce order emails from frontend
- how to execute a function only when i send an order to trash [closed]
- Are woocommerce_thankyou hook and is_order_received_page() redundant? [closed]
- Weekly cron is either missing the schedule or triggered too many times on Fridays