Created
May 18, 2021 06:05
-
-
Save wbcomdev/c0d1dcca1fcec38c4e2e33386da890f7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Change the placeholder image. | |
| */ | |
| function wb_woocommerce_placeholder_img_src( $src ) { | |
| $upload_dir = wp_upload_dir(); | |
| $uploads = untrailingslashit( $upload_dir['baseurl'] ); | |
| // replace with path to your image. | |
| $src = $uploads . '/2012/07/thumb1.jpg'; | |
| return $src; | |
| } | |
| add_filter( 'woocommerce_placeholder_img_src', 'wb_woocommerce_placeholder_img_src' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment