Skip to content

Instantly share code, notes, and snippets.

@mikeyarce
Created March 26, 2018 20:00
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 mikeyarce/36b3152e58a8dc73a04b86e60dae9aa9 to your computer and use it in GitHub Desktop.
Save mikeyarce/36b3152e58a8dc73a04b86e60dae9aa9 to your computer and use it in GitHub Desktop.
Remove relative URLs for WooCommerce product images
<?php
/**
* Remove relative URLs for WooCommerce product images
*/
add_filter( 'woocommerce_product_get_image', function( $url, $product, $size, $attr, $placeholder, $image ) {
return $image;
}, 10, 6 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment