Last active
May 19, 2022 19:27
-
-
Save UraraReika/a59a0ffac70c5a2fa8fbf5fd3f4b44c9 to your computer and use it in GitHub Desktop.
Replace default Elementor image placeholder to Woocommerce Placeholder image
This file contains 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
<?php | |
add_filter( 'jet-woo-builder/template-functions/placeholder-thumbnail-src', '__your_prefix_get_wc_placeholder_image' ); | |
function __your_prefix_get_wc_placeholder_image() { | |
$placeholder = wc_placeholder_img_src( 'woocommerce_thumbnail' ); | |
return $placeholder; | |
} |
This opening php tags used for highlighting the php syntax.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, Perfectly worked on my client site, but I had to remove opening php tag, I think it is better to remove opening php tag. Should be mentioned that I am using Elementor pro+jetwoobuilder.
add_filter(
'jet-woo-builder/template-functions/product-thumbnail-placeholder', '__your_prefix_get_wc_placeholder_image'
);`