Snippets: Alter WooCommerce Placeholder Image HTML

The following snippet allows you to override the default placeholder image HTML output for your main shop page and archives. If all you want to do is change the default placeholder image (not the full html) you can do this in the WooCommerce settings under Products > Placeholder image.

function my_woo_placeholder_img_html( $html ) {
    $html = 'YOUR CUSTOM PLACEHOLDER IMAGE HTML';
    return $html;
}
add_filter( 'wpex_woo_placeholder_img_html', 'my_woo_placeholder_img_html' );

Version Required:2.0.2+

Snippet Type: PHP

Posted Under: WooCommerce

All PHP snippets should be added via a child theme's functions.php file.