• Resolved hillac1993

    (@hillac1993)


    Hi
    The plugin isn’t replacing the default placeholder – is it possible to do this?

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author gazchap

    (@gazchap)

    Assuming that I’m looking at the correct link, none of the products on your website have any images associated with them, so the category thumbnail cannot find any product images to use to replace the placeholder category image.

    Thread Starter hillac1993

    (@hillac1993)

    I believe you are, however woocommerce uses a default placeholder image (the greyed out icon, when this is removed, it comes up with the img alt text so there is an image being used.

    Hi,
    Thank you for this great plugin,

    I’m having the same issue with my website. Even when it findes an image in the subcategory, the default woocommerce image still not replacing the old one.

    I hope there is a fix for this.

    Regards,

    Plugin Author gazchap

    (@gazchap)

    hillac1993: I’m afraid I’m not sure I understand – from what I can tell, you do not have images attached to any of your products, so WooCommerce is showing the default placeholder image instead. If you add images to your products, the plugin will then be able to show some product images.

    xsblack: Could you provide me with a link to the affected page please, as well as details on which version of WordPress and WooCommerce you’re using – along with details on the theme if possible please also.

    Plugin Author gazchap

    (@gazchap)

    hillac1993: Ah, I think I see what you mean now (and I’ve just noticed the “duplicated” tag on this post) – there are product images showing now, but it’s showing 2 for each category, instead of one – is that what you mean?

    Plugin Author gazchap

    (@gazchap)

    Having looked back through my emails, this isn’t the first time this particular issue has been raised with me – although I’ve been unable to replicate it myself, which leads me to believe something is conflicting.

    If you could both send me a list of the plugins that you have installed (and their versions) along with the WordPress and WooCommerce information, that would be much appreciated.

    Hi @gazchap ,
    I’m sorry for not being able to give you access to my website, because its on local network. but, i think this is because the theme have deferent hook name for the subcategory thumbnail. I tried to search about it in the internet but without any results. The same issue is happening with the similar plugin called “WooCommerce Auto Category Thumbnails” – https://www.ads-software.com/plugins/woocommerce-auto-category-thumbnails/
    it couldn’t remove the action of the old thumbnails.
    i’m using WC 3.6.5 and WordPress 5.0.3

    Thank you.

    Hi,

    I have a good news, i was right, i manage to fix the issue by removing the actions that the theme is adding to show the thumbnails, i searched in my code for the action that is replacing the default thumbnails and removed them in my functions.php file with this code:

    remove_action( ‘woocommerce_before_subcategory_title’, ‘woocommerce_subcategory_thumbnail’, 10 );

    remove_action( ‘woocommerce_before_subcategory_title’,
    ‘theme action that is replacing the default thumbnails’, 10 );

    The idea is to remove all the thumbnails that is hooked to this action “woocommerce_before_subcategory_title”

    I hope this help you to fix future issues.

    Best Regards,
    Hussain

    Thread Starter hillac1993

    (@hillac1993)

    Hi Gaz,
    I have no idea how that happened… I used a different plugin go replace the images and that’s the result!

    Don’t suppose you know how to fix it? ??

    Xsblack seems like he’s on to a winner there, maybe it’s something you can roll out as an update? I’m not using child themes so if I change the functions and theme is updated, I’ll lose the changes made (I should be using a child theme really)

    Plugin Author gazchap

    (@gazchap)

    Thanks xsblack, that’s what I thought it would be.

    hillac1993: Could you look for any similar actions in your theme please and see if the same fix can be applied to that?

    Unfortunately, it’s not something I can really roll out into an update – each theme that adds things on to that hook will likely use different names for each callback function, so I’d need to maintain a list of “problem” callbacks – and even then, I’m not keen on plugins that change things that are outside of their remit.

    I’ll add a note into the README.txt that mentions this and advises of possible solutions, though.

    Thread Starter hillac1993

    (@hillac1993)

    Hi Gaz, I’m not nearly tech savvy enough ??

    Any idea what exactly I need to look for? Is it just the usual functions.php in the main wp includes directory?

    Plugin Author gazchap

    (@gazchap)

    It would be functions.php but in the wp-content/themes/<your-theme> directory.

    If you’re happy for me to have a look for you, then please create me an Administrator user account using my email address (gazchap at gmail dot com) and I’ll see what I can find!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Plugin doesn’t replace default placeholder image’ is closed to new replies.