wc_placeholder_img_src

Get the placeholder image URL for products etc.

Description

(string) wc_placeholder_img_src(); 

Returns (string)


Usage

  1. if ( !function_exists( 'wc_placeholder_img_src' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-product-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wc_placeholder_img_src(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-product-functions.php  
  1. function wc_placeholder_img_src() { 
  2. return apply_filters( 'woocommerce_placeholder_img_src', WC()->plugin_url() . '/assets/images/placeholder.png' );