woocommerce_demo_store

The WooCommerce woocommerce demo store hook.

Description

Parameters (2)

0. $p_class_woocommerce_store_notice_demo_store_wp_kses_post_notice_a_href_class_woocommerce_store_notice_dismiss_link_esc_html_dismiss_woocommerce_a_p — Optional. (string) => '

' . wp_kses_post( $notice ) . ' ' . esc_html__( 'Dismiss', 'woocommerce' ) . '

'
The class woocommerce store notice demo store wp kses post notice a href class woocommerce store notice dismiss link esc html dismiss woocommerce a p.
1. $notice (unknown)
The notice.

Usage

To run the hook, copy the example below.
  1. $p_class_woocommerce_store_notice_demo_store_wp_kses_post_notice_a_href_class_woocommerce_store_notice_dismiss_link_esc_html_dismiss_woocommerce_a_p = apply_filters( 'woocommerce_demo_store', $p_class_woocommerce_store_notice_demo_store_wp_kses_post_notice_a_href_class_woocommerce_store_notice_dismiss_link_esc_html_dismiss_woocommerce_a_p, $notice ); 
  2.  
  3. if ( !empty( $p_class_woocommerce_store_notice_demo_store_wp_kses_post_notice_a_href_class_woocommerce_store_notice_dismiss_link_esc_html_dismiss_woocommerce_a_p ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_demo_store callback 
  2. function filter_woocommerce_demo_store( $p_class_woocommerce_store_notice_demo_store_wp_kses_post_notice_a_href_class_woocommerce_store_notice_dismiss_link_esc_html_dismiss_woocommerce_a_p, $notice ) { 
  3. // make filter magic happen here... 
  4. return $p_class_woocommerce_store_notice_demo_store_wp_kses_post_notice_a_href_class_woocommerce_store_notice_dismiss_link_esc_html_dismiss_woocommerce_a_p
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_demo_store', 'filter_woocommerce_demo_store', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_demo_store', 'filter_woocommerce_demo_store', 10, 2 ); 

Defined (1)

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

/includes/wc-template-functions.php  
  1. echo apply_filters( 'woocommerce_demo_store', '<p class="woocommerce-store-notice demo_store">' . wp_kses_post( $notice ) . ' <a href="#" class="woocommerce-store-notice__dismiss-link">' . esc_html__( 'Dismiss', 'woocommerce' ) . '</a></p>', $notice );