Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Cambiar la imagen por defecto en producto WooCommerce

// Cambiar la imagen por defecto en WooCommerce
add_action( 'init', 'custom_placeholder_image' );
 
function custom_placeholder_image() {
  add_filter('woocommerce_placeholder_img_src', 'custom_woocommerce_placeholder_img_src');
   
	function custom_woocommerce_placeholder_img_src( $src ) {
	$upload_dir = wp_upload_dir();
	$uploads = untrailingslashit( $upload_dir['baseurl'] );
	$src = $uploads . '/2016/06/producto-no-disponible.png';
	 
	return $src;
	}
}
 
PREVIOUS NEXT
Tagged: #Cambiar #la #imagen #por #defecto #en #producto #WooCommerce
ADD COMMENT
Topic
Name
5+9 =