Support » Plugin: WPC Smart Quick View for WooCommerce » Change proposal

  • Hey, first of all thanks very much for your work. Excellent plug-in, my client loves it!

    Please allow me to propose a small (non-breaking) addition to the plug-in logic. A requirement came up for me to always show a placeholder for certain products. For the sake of clean code, I thought the best way to do this would be to add a little filter at index.php:181:

    if ( ! empty( $thumb_ids ) && ! apply_filters("woosq_always_placeholder", false) ) {

    instead of just

    if ( ! empty( $thumb_ids ) {

    This gives us a way to alter the behavior in another plug-in or the theme functions.php:

    add_filter( "woosq_always_placeholder", function(){ return true; }, 10);

    … or, thanks to PHP 7.4 arrow functions:

    add_filter( "woosq_always_placeholder", fn() => true ), 10);

    I hope you will find this useful and consider including the code in future updates.

    Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Author WPClever

    (@wpclever)

    Hi,

    Thank you very much for your suggestion. I will transfer this to our developers for consideration. Hopefully this will be added in the coming updates of our plugin.

    We wish you a nice day. Hope you enjoy our plugin.
    Best regards.

    • This reply was modified 3 months, 1 week ago by WPClever.
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.