|
| 1 | +# Introduction |
| 2 | +This is a plugin which extends the Crocoblock Jet Engine plugin for Elementor. |
| 3 | + |
| 4 | +It adds support for the Dynamic Visibility functionality to check if the user |
| 5 | +has purchased a WooCommerce product by entering the product id. |
| 6 | + |
| 7 | +# Usage |
| 8 | +Install the plugin and activate it. |
| 9 | + |
| 10 | +You need JetEngine and WooCommerce installed as well. |
| 11 | + |
| 12 | +Don't forget that Dynamic Visibility needs to be enabled in JetEngine: |
| 13 | + |
| 14 | + 1. In your admin panel, go to JetEngine > JetEngine to see the JetEngine dashboard |
| 15 | + 2. Toggle the "Dynamic Visibility for Widgets and Section" slider. |
| 16 | + 3. Hit the “Save” button. |
| 17 | + |
| 18 | +Then you can find it in Advanced > Dynamic Visibility. |
| 19 | + |
| 20 | +Just look under User > User has purchased product. |
| 21 | + |
| 22 | +Enter the product id to check for. |
| 23 | + |
| 24 | +(Check the known issues at the end of this readme before using this plugin) |
| 25 | + |
| 26 | +# Changelog |
| 27 | +0.5.0 - 21 February 2022 |
| 28 | + - Initial release |
| 29 | + - Supports built in wc product purchased check with single product id |
| 30 | + |
| 31 | +# Inspiration |
| 32 | +This was based on a request in this support ticket: |
| 33 | + |
| 34 | + - https://github.com/Crocoblock/suggestions/issues/4902 |
| 35 | + |
| 36 | +I used the snippet from here to do the heavy lifting: |
| 37 | + |
| 38 | + - https://www.businessbloomer.com/woocommerce-check-current-user-already-purchased-product/ |
| 39 | + |
| 40 | +And based the plugin structure on these two great starting points: |
| 41 | + |
| 42 | + - https://github.com/UraraReika/jet-engine-single-products-widget-custom-visibility-conditions/ |
| 43 | + - https://github.com/MjHead/jet-engine-custom-visibility-conditions/ |
| 44 | + |
| 45 | +# Known Issues |
| 46 | +There are potential issues with this that I haven't investigated fully but did |
| 47 | +read about during development. |
| 48 | + |
| 49 | +It may be that refunded products are not filtered out with this function: |
| 50 | + |
| 51 | + - https://github.com/woocommerce/woocommerce/issues/17959#issuecomment-831418890 |
| 52 | + |
| 53 | +It may be that this method may seriously slow down your website: |
| 54 | + |
| 55 | + - https://github.com/woocommerce/woocommerce/issues/16604 |
| 56 | + |
| 57 | +I followed the discussion of this and related support tickets, and it was |
| 58 | +"solved", but then a bug was found, it was rolled back, and they gave up, |
| 59 | +so I'm not sure what the current status of this is. |
| 60 | + |
| 61 | +# Licence |
| 62 | +This plugin is licenced under GPL 3, and is free to use on personal and |
| 63 | +commercial projects. |
| 64 | + |
| 65 | +# Author |
| 66 | +Built by Matthew Harris of runthings.dev, copyright 2022. |
| 67 | + |
| 68 | +https://runthings.dev/ |
0 commit comments