WooCommerce

Snippets für die functions.php des Child Themes

Zoom auf das Produktbild entfernen

/** -----------------------------------------------------------------------------------
 * Remove product image zoom
 * ----------------------------------------------------------------------------------- */
 
function no_zoom() {
	remove_theme_support( 'wc-product-gallery-zoom' );
}
add_filter( 'woocommerce_single_product_zoom_enabled', 'no_zoom' );
/** -----------------------------------------------------------------------------------
 * Remove product image link
 * ----------------------------------------------------------------------------------- */
 
add_filter( 'woocommerce_single_product_image_thumbnail_html', 'custom_remove_product_link' );
function custom_remove_product_link( $html ) {
  return strip_tags( $html, '<div><img>' );
}

Verwandte Produkte ausblenden

Die „Verwandschaft“ wird automatisch berechnet und ergibt wenig Sinn.

/** -----------------------------------------------------------------------------------
 * Remove related products output
 * ----------------------------------------------------------------------------------- */
 
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );

Download-Bereich im Kunden-Konto entfernen

/** -----------------------------------------------------------------------------------
 * Remove WooCommerce Download Section
 * ----------------------------------------------------------------------------------- */
 
function removeWooCommerceDownloadSection($items) {
	unset( $items['downloads'] );
	return $items;
}
add_filter('woocommerce_account_menu_items', 'removeWooCommerceDownloadSection', 10, 1);