Before you begin
↑ Back to topBefore using this product, please ensure you review and accept our terms and conditions and privacy policy.
Installation and updates
↑ Back to topBefore using this product on a production website you should thoroughly test it on a staging/development environment, including all aspects of your website and potential data volumes, even if not directly related to the functionality the product provides.
The same process should also be completed when updating any aspect of your website in future, such as performing installations/updates, making changes to any configuration, custom web development, etc.
Always refer to the changelog before updating.
Installation
↑ Back to topPlease see this documentation.
Updates
↑ Back to topPlease see this documentation.
Quick start guide
↑ Back to top- Perform the installation steps above
- Go to WooCommerce > Settings > Products > Product likes
- Configure the settings as required, we recommend using the defaults
- Once the settings have been saved products throughout your store will display like buttons as per the settings used
- Once you have built up a number of likes go to Products > Likes to access the likes dashboard which shows how many likes products/customers have and you can view which products have been liked/which products specific customers have liked
Settings
↑ Back to topYou can access the settings at WooCommerce > Settings > Products > Product Likes.
It includes several configuration options including enabling like buttons for non-logged in users, my account likes list, display preferences, icon types and more.
- Enable
- Enables product likes across your store, ensure you also enable at least one of the display options below.
- Enable if not logged in
- Allows users without an account to like products, user will see their likes on products for 30 days or until cookies cleared. After this period likes by a not logged in user will still count towards the total number of product likes.
- Enable in account
- Adds a page within the user’s account listing the products previously liked.
- Display on product pages
- Displays a product like button on product pages. This is displayed via the
woocommerce_product_meta_start
hook which all themes generally include, if this setting is enabled and it is not displayed then ask your theme developer how to enable this hook, if you are using a page builder it should include a product meta block you can add to your page which will include this hook. Alternatively you can display this using the alternativewoocommerce_after_add_to_cart_form
hook by addingadd_filter( 'wcpl_product_likes_products_alternative_hook', '__return_true' );
to your theme’s functions file, however this is not recommended as this hook is not used if a product is not purchasable (e.g. out of stock).
- Displays a product like button on product pages. This is displayed via the
- Display on product archive pages
- Displays a product like button on each product in an archive page (e.g. shop page, product categories, search, etc). This is displayed via the
woocommerce_after_shop_loop_item
hook which all themes generally include, if this setting is enabled and it is not displayed then ask your theme developer how to enable this hook, if you are using a page builder it should include a product archive (or similar name) block you can add to your page which will include this hook.
- Displays a product like button on each product in an archive page (e.g. shop page, product categories, search, etc). This is displayed via the
- Display on product blocks
- Displays a product like button on each product in any core WooCommerce product block (excluding the All Products block due to extensibility constraints).
- Display total likes
- Displays the total number of likes if a product has been liked.
- Icon
- Icon type used for product likes. If you wish to use a custom icon set this to none (or disable styles entirely) and apply your own with custom CSS.
- Styles
- Adds styles to product likes, if disabled this will remove all styles from product likes including the icon chosen, this option should only be disabled if you wish to style product likes yourself with CSS.
Display
↑ Back to topProduct like buttons and total likes are shown on the product page and on each product in an archive page (e.g. product category), you can disable the display on either of these areas if needed. You can select the icon type (heart, thumb or none) or choose to remove all styling and style yourself with CSS.
A list of all the products a user has liked is included in the likes tab in their account.
Dashboard
↑ Back to topThe likes dashboard can be accessed via Products > Likes and shows a list of your products and their likes total. You can click a like total to see which customers/how many guests liked the product. The likes dashboard and be searched/sorted and you can export/print all the data. It also includes a customer totals tab which lists all customers, how many likes they’ve made and you can click the total likes to see which products they liked.
Non-logged in users
↑ Back to topFor users who aren’t logged in their likes will count towards the product’s like total and their likes will remain visible when they visit your store until their cookie expires or is deleted. You can disable this option if needed via settings.
Most liked
↑ Back to topIf you want to display a list of most liked products you can use the standard WooCommerce products shortcode, simply add the wcpl-product-likes-products-shortcode-most-liked
class to it, e.g. [products class="wcpl-product-likes-products-shortcode-most-liked" cache="false"]
. Other standard attributes of this shortcode can also be used, with the exception of any ordering based attributes. It is recommended to set cache to false as per the example.
Post meta
↑ Back to topProduct post meta with the key _wcpl_product_likes_likes
is used to store the total number of likes, this data should not be manipulated via database edits, imports, custom development, or by using clone product plugins (the standard WooCommerce duplicate product functionality is fine). It should not be manipulated as the data is in sync with a database table containing each like, this database table should also not be manipulated under any circumstances. If the post meta is manipulated you will see inconsistencies in the likes totals. If you have any data issues, try resyncing post meta. Please note that resyncing post meta will only rectify any data issues if the database table has not been manipulated in any way.
If you want to resync post meta, go to https://example.com/wp-admin/admin.php?page=wcpl-product-likes-debug
, replacing https://example.com/wp-admin/
with your website address.
It is recommended you take a backup before doing so.
Delete all likes
↑ Back to topIf you want to delete all likes data, go to https://example.com/wp-admin/admin.php?page=wcpl-product-likes-debug
, replacing https://example.com/wp-admin/
with your dashboard address.
It is recommended you take a backup before doing so.
Custom development
↑ Back to topThe following information is provided for custom development purposes for web developers, they are useful if you wish to add custom features or modify how the extension works. As per the WooCommerce support policy we cannot offer any support for your use of these custom development features.
Filter hooks
↑ Back to topFilter hook | Description |
---|---|
wcpl_product_likes_likes_none_text | Change text in my account when no products yet liked |
wcpl_product_likes_likes_text | Change likes text |
wcpl_product_likes_like_text | Change like text |
wcpl_product_likes_products_alternative_hook | Return false to use default woocommerce_product_meta_start action hook, return true to use woocommerce_after_add_to_cart_form (not recommended) – see display on product pages information in settings for further details |
wcpl_product_likes_total_after_text | Change text which appears after total likes |
wcpl_product_likes_total_before_text | Change text which appears before total likes |
wcpl_product_likes_unlike_text | Change unlike text |
BETA functionality
↑ Back to topWe may occasionally include BETA functionality, this is highlighted with a (BETA)
label. Functionality with this label should be used with caution and is only recommended to be tested on a staging/development environment. The functionality is included so users can test the functionality/provide feedback before it becomes stable, at which point the (BETA)
label will be removed. Note that there may be occasions where BETA functionality is determined unsuitable for use and removed entirely.
Caching
↑ Back to topIf you are using any form of caching then it is recommended that the cache lifespan/expiry should be set to 10 hours or less. This is recommended by most major caching solutions to avoid potential issues with WordPress nonces.
Cookies
↑ Back to topThis extension may set the following cookies, it is recommended you include details of these cookies in your cookie policy.
Name | Description | Expiry |
---|---|---|
wcpl_product_likes | Used to give a unique ID to a user who isn’t logged in so their likes are remembered until the cookie is removed. | 30 days |
Screen sizes
↑ Back to top- Frontend: Where elements may be displayed they will fit within the screen width
- Backend: Where interfaces may be displayed it is recommended to use a desktop computer with a resolution of 1920×1080 or higher, for lower resolutions any interfaces will attempt to fit within the screen width but some elements may be close together and/or larger than the screen width
Translation
↑ Back to topWe generally recommend Loco Translate to translate and/or adapt text strings within this product.
Works with
↑ Back to topWhere we have explicitly stated this product works with another product, this should only be assumed accurate if you are using the version of the other product which was the latest at the time the latest version of this product was released. This is because, while usually unlikely, the other product may have changed functionality which effects this product.
FAQs
↑ Back to topIs it compatible with a specific theme?
↑ Back to topThis extension will generally be compatible with most themes. There may be a small number of themes that are fully or partially incompatible due to clashes in functionality and/or if the theme has removed or adapted core WooCommerce functionality. If you would like to know if a specific theme will be compatible before purchase then please contact us and we can advise, it may not be possible for us to determine this e.g. if the theme requires a license and/or several configuration steps. In this scenario you are welcome to purchase and test this extension with the theme and if there is a a compatibility issue you can take advantage of the refund policy for this extension.
Is it compatible with a specific extension/plugin?
↑ Back to topThis extension will generally be compatible with most extensions/plugins. There may be a small number of extensions/plugins that are fully or partially incompatible due to clashes in functionality and/or if the extension/plugin has removed or adapted core WooCommerce functionality. If you would like to know if a specific extension/plugin will be compatible before purchase then please contact us and we can advise, it may not be possible for us to determine this e.g. if the extension/plugin requires a license and/or several configuration steps. In this scenario you are welcome to purchase and test this extension with the other extension/plugin and if there is a a compatibility issue you can take advantage of the refund policy for this extension.
Is it compatible with a specific page builder?
↑ Back to topThis extension will generally be compatible with most page builders. There may be a small number of page builders that are fully or partially incompatible due to clashes in functionality and/or if the page builder has removed or adapted core WooCommerce functionality. If you would like to know if a specific page builder will be compatible before purchase then please contact us and we can advise, it may not be possible for us to determine this e.g. if the page builder requires a license and/or several configuration steps. In this scenario you are welcome to purchase and test this extension with the page builder and if there is a a compatibility issue you can take advantage of the refund policy for this extension.
Support
↑ Back to topIf you need any further assistance with this extension please contact us. Please note that extension support does not include providing assistance with any custom development requirements as per the WooCommerce support policy.