Skip to content

Instantly share code, notes, and snippets.

@krogsgard
Created July 10, 2012 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krogsgard/3085998 to your computer and use it in GitHub Desktop.
Save krogsgard/3085998 to your computer and use it in GitHub Desktop.
Little more dev-site friendly
<?php
/*
* goes in theme functions.php or a custom plugin
*
**/
add_filter('woocommerce_placeholder_img_src', 'custom_woocommerce_placeholder_img_src');
function custom_woocommerce_placeholder_img_src( $src ) {
$upload_dir = wp_upload_dir();
$uploads = untrailingslashit( $upload_dir['baseurl'] );
$src = $uploads . '/2012/07/thumb1.jpg';
return $src;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment