• Resolved maxence1502

    (@maxence1502)


    Hello,

    Is it possible to add a small icon on the store for products that the user has already bought at least once ?

    Thank you for your help

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there 👋

    At the moment, there’s no default option for that in WooCommerce and setting that as the default would require quite a bit of additional coding. Please kindly note that this requires some custom coding – which goes beyond the scope of support we are able to provide in this forum.

    However, I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.`

    If you do require more help with the actual coding, we’d recommend you hire a developer who can take a look at this, quote you for their services and help you add this feature to your site. We’d recommend getting in touch with a web developer or one of the customization experts listed at https://woocommerce.com/customizations/.

    Cheers.

    Thread Starter maxence1502

    (@maxence1502)

    There is no addon like that, that already exist ?
    That’s a pretty easy feature

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    The plugins I encountered only have the functionalities to add a sold badge when a product has been completely sold out, but not when a user has purchased it before.

    I’m sure that a WooCommerce developer from the link I provided previously could easily help you with that feature.

    Plugin Support abwaita a11n

    (@abwaita)

    Hi @maxence1502,

    As for the custom coding option, you could use/modify a code snippet I found on this website:

    /* Already purchased this product */
    add_action( 'woocommerce_after_shop_loop_item', 'wphelp_you_already_bought_this', 30 );
    function wphelp_you_already_bought_this() {
    global $product;
    if ( ! is_user_logged_in() ) return;
    $current_user = wp_get_current_user();
    if ( wc_customer_bought_product( $current_user->user_email, $current_user->ID, $product->get_id() ) ) echo '<div class="user-bought">&hearts; Hello ' . $current_user->first_name . ', you already bought this! Are you interested on it again?</div>';
    }

    Just to mention, we also have the Buy Again for WooCommerce extension which adds a buy again section on the customer’s account page as well as a notification on the product page.

    For more info on it’s features, be sure to check it’s documentation or create a presales ticket with us.

    Hope this helps.
    Thanks.

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Icon for products already bought’ is closed to new replies.