WooCommerce Last Purchased

WooCommerce Last Purchased

Wordpress plugin

Install on Wordpress

App Details

This little WooCommerce plugin shows last purchased date on single product page. It shows last purchase date made by anyone, not just current user. If current product has no sales yet, popup will not appear.

Why would I show this to my customers?

From my experience, showing last purchased date can increase conversion rate. This trick is using by Allegro (www.allegro.pl), biggest auction and sales website in Poland.

Basic usage

Just install plugin and you are ready to go.

Using just date in your theme (and hide popup if needed)

So you want to get last purchased date somewhere in your theme files? No problem.

First way: using WooCommerce hooks

In you function.php file paste below code.

function show_last_purchased_date(){ if ( WLP()->last_purchased_date() ){ echo '<div class="last-purchased-date">' . WLP()->last_purchased_text() . ': ' . WLP()->last_purchased_date() . '</div>'; } } add_action('woocommerce_product_meta_end', 'show_last_purchased_date'); 

For more information about WooCommerce hooks, please visit WooCommerce documentation.

Second way: override WooCommerce template

You can achieve exact same result by overriding WooCommerce templates.

You will need to override one of WooCommerce templates. In this case we will put this information right after Add to cart button and SKU.

For more information about this, please visit WooCommerce documentation.

  1. Go to your woocommerce plugin directory.
  2. Go to templates directory.
  3. Go to single-product.
  4. Copy meta.php file to ‘your_theme_directory/woocommerce/single-product/’.
  5. If you don’t have such directory, create it.
  6. Now add below code just before <?php do_action( 'woocommerce_product_meta_end' ); ?>

    last_purchased_date() ): ?>

    <div class="last-purchased-date"> <?php echo WLP()->last_purchased_text(); ?>: <?php echo WLP()->last_purchased_date(); ?> </div> 

Don’t show popup

In your functions.php:

function hide_wlp_popup(){ WLP()->hide_popup = true; } add_action('before_wlp_init', 'hide_wlp_popup'); 

Styling

You can override popup styles. Just place your rules in your theme style.css file. Couple examples below.

Display popup in bottom left corner instead of bottom right

.wlp-popup{ left: 15px; right: auto; margin-right: 15px; } 

Change background and text color

.wlp-popup{ background: rgba(98,233,219,0.9); color:#0b413b; } 

Remove rounded corners, non-transparent background, no X button

.wlp-popup{ background: #76234c; border-radius: 0; } .wlp-popup-close{ display:none; } 

Version history

1.0.1 – Popup not appearing bug fixed
1.0 – Initial version

Translations

This plugin is translation ready. You can help by translating this plugin into your language. All languages are stored in languages directory.

`Time ago` text translation.

This plugin uses timeago.js jQuery plugin. This plugin is also ready for translations. You can find all available languages here. If your language is not available in timeago.js plugin, you will need to create such translation as well.

TODO List

This plugin is free, and I have got limited time. However I will try to implement following features in near future:

  • Add options to WordPress admin area:
    • show/hide close button,
    • popup appear settings,
    • custom css field,
  • Ability to override popup html to your own.

License

This plugin is released under GPLv2 license. This plugins is free to use both in personal and commercial usage. It’s distributed “as is”, and no support from the author is provided.

Special thanks

Special thanks to Ryan McGeary (http://ryan.mcgeary.org), author of timeago.js, jQuery plugin used in this little project.

Pricing

Starting from $0 per month.

Check Out the Count-Up Clock Widget

By Common Ninja

Count-Up ClockTry For Free!

App Info

Rating

Reviewers

1 reviews

Tags

woocommerce

Developed By

Dawid Urbanski

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Count-Up Clock for Wordpress logo

Count-Up Clock

Track time since important events with a count up clock that displays elapsed days and hours and keeps visitors engaged.

Wake Up Notifications for Wordpress logo

Wake Up Notifications

Use wake up notifications to re engage visitors with custom alerts that capture attention, boost interaction, and help increase conversions across your site.

LinkedIn Feed Slider for Wordpress logo

LinkedIn Feed Slider

Show LinkedIn posts with a slider that auto updates, presents content in a smooth layout, and keeps visitors engaged.

Multi-Row Image Slider for Wordpress logo

Multi-Row Image Slider

Showcase visuals with a multi row image slider that displays images in layered rows, improves design, and helps visitors explore content more easily.

Social Proof for Wordpress logo

Social Proof

Show social proof that displays real user activity to build trust instantly, boost credibility, and help increase conversions across your site.

Engagement Toolbox for Wordpress logo

Engagement Toolbox

Use an engagement toolbox that combines forms, galleries, chats, and interactive elements to increase visitor activity and create a more engaging user experience.

Corner Pop-up for Wordpress logo

Corner Pop-up

Add a floating corner pop-up to display updates or calls to action without disrupting the user experience or site flow.

Subscription Button for Wordpress logo

Subscription Button

Use a subscription button to streamline recurring payments, simplify signup, and help increase conversions with seamless PayPal or Stripe integration.

Lottie Player for Wordpress logo

Lottie Player

Use a Lottie player to embed lightweight JSON animations that improve visual design, keep pages fast, and create a smoother user experience.

Card Slider for Wordpress logo

Card Slider

Showcase content with a card slider that presents images, text, and buttons in a smooth, customizable layout to keep visitors engaged.

Social Votes for Wordpress logo

Social Votes

Encourage interaction with social votes that let visitors like, upvote, and rank content, boosting engagement and guiding better decisions.

Instagram Slider for Wordpress logo

Instagram Slider

Add an Instagram slider to your site to display social posts dynamically and keep your visual content engaging and current.

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms