تابع ووکامرسی woocommerce_demo_store افزودن بنر نمایش به فروشگاه

تابع ووکامرسی woocommerce_demo_store – افزودن بنر نمایش به فروشگاه در صورتی که فعال باشد
Syntax – سینتکس
woocommerce_demo_store();
Usage – نحوه استفاده
if ( !function_exists( 'woocommerce_demo_store' ) ) {
require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-template-functions.php';
}
// NOTICE! Understand what this does before running.
$result = woocommerce_demo_store();
Defined – محل تعریف
/includes/wc-template-functions.php
function woocommerce_demo_store() {
if ( ! is_store_notice_showing() ) {
return;
}
$notice = get_option( 'woocommerce_demo_store_notice' );
if ( empty( $notice ) ) {
$notice = __( 'This is a demo store for testing purposes — no orders shall be fulfilled.', woocommerce );
}
echo apply_filters( 'woocommerce_demo_store', '' . wp_kses_post( $notice ) . ' ' . esc_html__( 'Dismiss', woocommerce ) . '
', $notice );
}
versions – نسخه ها
از نسخه : 3.0.2
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر