Search
 
SCRIPT & CODE EXAMPLE
 

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;
	}
}
Comment

PREVIOUS NEXT
Code Example
Php :: find php ini 
Php :: rule for radio button in laravel 
Php :: ci4 throw new exception 
Php :: display error meaages in laravel blade 
Php :: array push in php 
Php :: laravel get second last record 
Php :: laravel select where with total sum query to get all data with sum 
Php :: php find multiple value in array 
Php :: How to display custom field in wordpress? 
Php :: php parse query string 
Php :: php script read source code web 
Php :: wordpress enqueue if shortcode 
Php :: signup form in php 
Php :: php rearrange array 
Php :: laravel wrong timestamp 
Php :: laravel seeder 
Php :: add key value array php 
Php :: PHP MySQL Insert Multiple Records 
Php :: Method IlluminateDatabaseEloquentCollection::delete does not exist. 
Php :: import data from csv to db php 
Php :: laravel blade if else condition 
Php :: SQLSTATE[42S02] lumen 
Php :: laravel update multiple select query 
Php :: magento 1.9 get all product 
Php :: count cpt wp 
Php :: php file_get_contents html with special characters 
Php :: php configuration in apache server 2.4 
Php :: laravel valet subdomain 
Php :: using get in laravel blade 
Php :: php into javascript 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =