mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
11 lines
326 B
Text
11 lines
326 B
Text
add_filter('woocommerce_single_product_image_thumbnail_html', 'remove_featured_image', 10, 2);
|
|
function remove_featured_image($html, $attachment_id ) {
|
|
global $post, $product;
|
|
|
|
$featured_image = get_post_thumbnail_id( $post->ID );
|
|
|
|
if ( $attachment_id == $featured_image )
|
|
$html = '';
|
|
|
|
return $html;
|
|
}
|