{"id":393224,"date":"2026-10-27T19:30:02","date_gmt":"2026-10-27T19:30:02","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/devdiggers-hide-price-for-woocommerce\/"},"modified":"2026-10-27T21:29:45","modified_gmt":"2026-10-27T21:29:45","slug":"devdiggers-hide-price-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/devdiggers-hide-price-for-woocommerce\/","author":20777317,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.4","requires":"6.5","requires_php":"7.4","requires_plugins":null,"header_name":"DevDiggers Hide Price for WooCommerce","header_author":"DevDiggers","header_description":"Hide prices and the add to cart button from guests or chosen user roles, on your whole catalog or selected products and categories. Show a login popup or your own link instead, and stop hidden prices leaking through Google, blocks and the Store API.","assets_banners_color":"fcfdfe","last_updated":"2026-10-27 21:29:45","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/devdiggers.com\/product\/woocommerce-hide-price-for-guest\/","header_author_uri":"https:\/\/devdiggers.com\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":65,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"devdiggers","date":"2026-10-27 21:29:45","revision":3769561}},"upgrade_notice":{"1.0.0":"<p>First release. After activating, run the setup wizard to choose who does not see prices.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.gif":{"filename":"icon-128x128.gif","revision":3769320,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.gif":{"filename":"icon-256x256.gif","revision":3769320,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3769320,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3769320,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3769563,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"meta\":{\"title\":\"Hide Price for WooCommerce demo\",\"description\":\"A wholesale homeware store where guests see a login button instead of prices, with the Hide Price dashboard.\",\"author\":\"devdiggers\",\"categories\":[\"WooCommerce\"]},\"landingPage\":\"\\\/wp-admin\\\/admin.php?page=ddwchpg-dashboard\",\"preferredVersions\":{\"php\":\"8.2\",\"wp\":\"latest\"},\"features\":{\"networking\":true},\"steps\":[{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"woocommerce\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"devdiggers-hide-price-for-woocommerce\"},\"options\":{\"activate\":true}},{\"step\":\"installTheme\",\"themeData\":{\"resource\":\"wordpress.org\\\/themes\",\"slug\":\"kadence\"},\"options\":{\"activate\":true}},{\"step\":\"setSiteOptions\",\"options\":{\"woocommerce_onboarding_profile\":{\"skipped\":true},\"woocommerce_task_list_hidden\":\"yes\",\"woocommerce_task_list_complete\":\"yes\",\"woocommerce_show_marketplace_suggestions\":\"no\",\"woocommerce_allow_tracking\":\"no\",\"woocommerce_coming_soon\":\"no\",\"ddfw_setup_wizard_completed_devdiggers-hide-price-for-woocommerce\":true}},{\"step\":\"runPHP\",\"code\":\"<?php\\nrequire '\\\/wordpress\\\/wp-load.php';\\nrequire_once ABSPATH . 'wp-admin\\\/includes\\\/image.php';\\n\\ndelete_transient( '_wc_activation_redirect' );\\ndelete_transient( 'ddfw_activation_redirect_devdiggers-hide-price-for-woocommerce' );\\n\\n$faces = [\\n\\t'admin@localhost.com'        => 'https:\\\/\\\/randomuser.me\\\/api\\\/portraits\\\/women\\\/68.jpg',\\n\\t'amara.okafor@example.com'   => 'https:\\\/\\\/randomuser.me\\\/api\\\/portraits\\\/women\\\/44.jpg',\\n\\t'liam.carter@example.com'    => 'https:\\\/\\\/randomuser.me\\\/api\\\/portraits\\\/men\\\/32.jpg',\\n\\t'kenji.watanabe@example.com' => 'https:\\\/\\\/randomuser.me\\\/api\\\/portraits\\\/men\\\/75.jpg',\\n\\t'priya.sharma@example.com'   => 'https:\\\/\\\/randomuser.me\\\/api\\\/portraits\\\/women\\\/90.jpg',\\n];\\nwp_mkdir_p( WPMU_PLUGIN_DIR );\\nfile_put_contents(\\n\\tWPMU_PLUGIN_DIR . '\\\/demo-avatars.php',\\n\\t\\\"<?php\\\\n\\\/\\\/ Live Preview only: show a portrait for each demo person.\\\\nadd_filter( 'pre_get_avatar_data', function ( \\\\$args, \\\\$id ) {\\\\n\\\\t\\\\$faces = \\\" . var_export( $faces, true ) . \\\";\\\\n\\\\t\\\\$email = '';\\\\n\\\\tif ( is_numeric( \\\\$id ) ) { \\\\$u = get_userdata( (int) \\\\$id ); \\\\$email = \\\\$u ? \\\\$u->user_email : ''; }\\\\n\\\\telseif ( is_string( \\\\$id ) ) { \\\\$email = \\\\$id; }\\\\n\\\\telseif ( \\\\$id instanceof WP_User ) { \\\\$email = \\\\$id->user_email; }\\\\n\\\\telseif ( \\\\$id instanceof WP_Comment ) { \\\\$email = \\\\$id->comment_author_email; }\\\\n\\\\t\\\\$email = strtolower( \\\\$email );\\\\n\\\\tif ( isset( \\\\$faces[ \\\\$email ] ) ) { \\\\$args['url'] = \\\\$faces[ \\\\$email ]; \\\\$args['found_avatar'] = true; }\\\\n\\\\treturn \\\\$args;\\\\n}, 10, 2 );\\\\n\\\"\\n);\\n\\nupdate_option( 'blogname', 'Hollis Trade Supply' );\\nupdate_option( 'blogdescription', 'Wholesale homeware for shops, cafes and studios' );\\nupdate_option( 'woocommerce_currency', 'USD' );\\nupdate_option( 'woocommerce_store_address', '210 Commerce Way' );\\nupdate_option( 'woocommerce_store_city', 'Minneapolis' );\\nupdate_option( 'woocommerce_default_country', 'US:MN' );\\nupdate_option( 'woocommerce_store_postcode', '55401' );\\nupdate_option( 'woocommerce_enable_myaccount_registration', 'yes' );\\nwp_update_user( [ 'ID' => 1, 'display_name' => 'Claire Hollis', 'first_name' => 'Claire', 'last_name' => 'Hollis', 'user_email' => 'admin@localhost.com' ] );\\n\\n$cats = [];\\nforeach ( [ 'Ceramics', 'Glassware', 'Furniture', 'Lighting', 'Accessories' ] as $name ) {\\n\\t$term          = wp_insert_term( $name, 'product_cat' );\\n\\t$cats[ $name ] = is_wp_error( $term ) ? 0 : $term['term_id'];\\n}\\n\\n$img_dir = WP_PLUGIN_DIR . '\\\/woocommerce\\\/assets\\\/images\\\/pattern-placeholders\\\/';\\n$catalog = [\\n\\t'vase'    => [ 'Green Lidded Canisters, case of 6', 168, 'sun-glass-vase-green-ceramic-shelf.jpg', 'Ceramics', 'Glazed stoneware canisters with wooden lids, packed six to a case.' ],\\n\\t'lamp'    => [ 'Ivory Pattern Table Lamp', 89, 'white-vase-decoration-pattern-ceramic-lamp.jpg', 'Lighting', 'Hand-carved ceramic base with a natural linen shade. Minimum order 4.' ],\\n\\t'stool'   => [ 'Oak Bistro Stool', 118, 'Image-table-wood-chair-stool-interior-restaurant.jpg', 'Furniture', 'Solid white oak, built for cafe and restaurant use.' ],\\n\\t'carafe'  => [ 'Blown Glass Carafe Set, case of 4', 152, 'drinkware-liquid-tableware-dishware-bottle-fluid.jpg', 'Glassware', 'One litre carafes with matching tumblers, four sets per case.' ],\\n\\t'budvase' => [ 'Eucalyptus Bud Vase, case of 10', 120, 'plant-white-leaf-flower-vase-green.jpg', 'Ceramics', 'Matte white porcelain bud vases for tables and counters.' ],\\n\\t'chair'   => [ 'Window Reading Chair', 265, 'table-wood-house-chair-floor-window.jpg', 'Furniture', 'Ash frame with a woven paper cord seat.' ],\\n\\t'watch'   => [ 'Twin-Lens Camera, display piece', 140, 'watch-hand-brand-jewellery-strap-platinum.jpg', 'Accessories', 'A restored film camera for shelf and window displays.' ],\\n\\t'player'  => [ 'Walnut Record Player, showroom sample', 249, 'music-needle-turntable-black-and-white-white-photography.jpg', 'Accessories', 'One-off showroom sample, open to everyone at a public price.' ],\\n];\\n$products = [];\\nforeach ( $catalog as $key => $p ) {\\n\\t$att_id = 0;\\n\\tif ( file_exists( $img_dir . $p[2] ) ) {\\n\\t\\t$upload = wp_upload_bits( $p[2], null, file_get_contents( $img_dir . $p[2] ) );\\n\\t\\t$att_id = wp_insert_attachment( [ 'post_mime_type' => 'image\\\/jpeg', 'post_title' => $p[0], 'post_status' => 'inherit' ], $upload['file'] );\\n\\t\\twp_update_attachment_metadata( $att_id, wp_generate_attachment_metadata( $att_id, $upload['file'] ) );\\n\\t}\\n\\t$prod = new WC_Product_Simple();\\n\\t$prod->set_name( $p[0] );\\n\\t$prod->set_regular_price( $p[1] );\\n\\t$prod->set_short_description( $p[4] );\\n\\t$prod->set_description( $p[4] . ' Trade prices are shown to registered buyers once they log in.' );\\n\\t$prod->set_image_id( $att_id );\\n\\t$prod->set_category_ids( [ $cats[ $p[3] ] ] );\\n\\t$prod->set_status( 'publish' );\\n\\t$products[ $key ] = $prod->save();\\n}\\n\\n\\\/\\\/ Plugin configuration (free features only). Option names follow DDWCHPG_File_Handler defaults.\\n$config = [\\n\\t'_ddwchpg_enable_hide_price'    => 'yes',\\n\\t'_ddwchpg_target_roles'         => [ 'ddwchpg_guest' ],\\n\\t'_ddwchpg_hide_mode'            => 'price',\\n\\t'_ddwchpg_hide_scope'           => 'all',\\n\\t'_ddwchpg_excluded_products'    => [ $products['player'] ],\\n\\t'_ddwchpg_block_purchase'       => 'yes',\\n\\t'_ddwchpg_hide_structured_data' => 'yes',\\n\\t'_ddwchpg_hide_store_api'       => 'yes',\\n\\t'_ddwchpg_enable_tracking'      => 'yes',\\n\\t'_ddwchpg_price_title'          => 'Trade pricing for registered buyers',\\n\\t'_ddwchpg_button_title'         => 'Log in to see wholesale price',\\n\\t'_ddwchpg_button_action'        => 'login',\\n\\t'_ddwchpg_login_popup'          => 'yes',\\n\\t'_ddwchpg_price_text_color'     => '#b4531a',\\n\\t'_ddwchpg_price_bg_color'       => '#fbefe6',\\n];\\nforeach ( $config as $k => $v ) {\\n\\tupdate_option( $k, $v );\\n}\\nadd_option( 'ddwchpg_installed_at', time() - 40 * DAY_IN_SECONDS );\\n\\n$people = [\\n\\t'amara' => [ 'Amara', 'Okafor', 'amara.okafor@example.com', 'Okafor Home Studio', 'Seattle', 'WA', '98101' ],\\n\\t'liam'  => [ 'Liam', 'Carter', 'liam.carter@example.com', 'Carter & Co Cafe', 'Denver', 'CO', '80203' ],\\n\\t'kenji' => [ 'Kenji', 'Watanabe', 'kenji.watanabe@example.com', 'Pine Street Goods', 'San Francisco', 'CA', '94104' ],\\n\\t'priya' => [ 'Priya', 'Sharma', 'priya.sharma@example.com', 'Sharma Interiors', 'Austin', 'TX', '78701' ],\\n];\\n$users = [];\\nforeach ( $people as $key => $p ) {\\n\\t$users[ $key ] = wp_insert_user( [ 'user_login' => $key, 'user_pass' => 'password', 'user_email' => $p[2], 'first_name' => $p[0], 'last_name' => $p[1], 'display_name' => $p[0] . ' ' . $p[1], 'role' => 'customer' ] );\\n\\tupdate_user_meta( $users[ $key ], 'billing_company', $p[3] );\\n}\\n\\n\\\/\\\/ Trade orders from logged-in buyers over five weeks.\\n$keys = [ 'vase', 'lamp', 'stool', 'carafe', 'budvase', 'chair', 'watch' ];\\n$i    = 0;\\nforeach ( $people as $who => $p ) {\\n\\tfor ( $n = 0; $n < 3; $n++, $i++ ) {\\n\\t\\t$addr  = [ 'first_name' => $p[0], 'last_name' => $p[1], 'company' => $p[3], 'email' => $p[2], 'address_1' => ( 10 + $i * 7 ) . ' Market Street', 'city' => $p[4], 'state' => $p[5], 'postcode' => $p[6], 'country' => 'US' ];\\n\\t\\t$order = wc_create_order( [ 'customer_id' => $users[ $who ] ] );\\n\\t\\t$order->add_product( wc_get_product( $products[ $keys[ ( $i * 3 ) % count( $keys ) ] ] ), 2 + ( $i % 3 ) );\\n\\t\\t$order->set_address( $addr, 'billing' );\\n\\t\\t$order->set_address( $addr, 'shipping' );\\n\\t\\t$order->set_date_created( time() - ( 1 + $i * 2 ) * DAY_IN_SECONDS );\\n\\t\\t$order->calculate_totals();\\n\\t\\t$order->set_status( $i < 2 ? 'processing' : 'completed' );\\n\\t\\t$order->save();\\n\\t}\\n}\\n\\n\\\/\\\/ Click counts behind the dashboard (DDWCHPG_Stats_Helper shape): days Y-m-d => clicks, products ID => clicks.\\n$weights = [ 'vase' => 9, 'lamp' => 6, 'stool' => 5, 'carafe' => 7, 'budvase' => 5, 'chair' => 3, 'watch' => 2 ];\\n$pool    = [];\\nforeach ( $weights as $k => $w ) {\\n\\t$pool = array_merge( $pool, array_fill( 0, $w, $k ) );\\n}\\n$stats = [ 'days' => [], 'products' => [] ];\\nfor ( $d = 59; $d >= 0; $d-- ) {\\n\\t$day   = gmdate( 'Y-m-d', current_time( 'timestamp' ) - $d * DAY_IN_SECONDS );\\n\\t$count = max( 1, (int) round( 4 + ( 59 - $d ) \\\/ 7 + ( in_array( gmdate( 'N', strtotime( $day ) ), [ '6', '7' ], true ) ? -2 : 1 ) + wp_rand( -1, 2 ) ) );\\n\\t$stats['days'][ $day ] = $count;\\n\\tfor ( $c = 0; $c < $count; $c++ ) {\\n\\t\\t$pid                       = $products[ $pool[ array_rand( $pool ) ] ];\\n\\t\\t$stats['products'][ $pid ] = ( $stats['products'][ $pid ] ?? 0 ) + 1;\\n\\t}\\n}\\narsort( $stats['products'] );\\nupdate_option( 'ddwchpg_click_stats', $stats, false );\\ndelete_transient( 'ddwchpg_coverage' );\\n\\n\\\/\\\/ ---- Storefront (Kadence + DevDiggers demo kit) ----\\n\\n\\\/\\\/ ---- DevDiggers Live Preview demo kit (Apple design language on Kadence) ----\\n\\\/**\\n * Inserted by build.py where a seed says \\\/\\\/ @kit. Call, after products and users exist:\\n *   ddwc_demo_kit_style( [ 'accent' => '#0071e3', 'css' => '' ] )  Kadence + global CSS.\\n *   ddwc_demo_kit_home( [...] )                                     Home page, set as front page.\\n *   ddwc_demo_kit_menu( [ 'Shop' => url, ... ] )                    Primary menu.\\n *   ddwc_demo_kit_switcher( $views_php )                            \\\"View as\\\" switcher mu-plugin.\\n *   ddwc_demo_kit_icon( 'chat' )                                    SVG line icon (names in the list below).\\n * Widget classes for the hero showcase: dk-widget, dk-w-head, dk-w-app, dk-w-label, dk-w-title,\\n * dk-w-big, dk-w-row, dk-w-pill, dk-w-avatar, dk-w-bubble, dk-w-note.\\n *\\\/\\n\\nfunction ddwc_demo_kit_icon( $name, $size = 24 ) {\\n\\t$paths = [\\n\\t\\t'admin'    => '<rect x=\\\"3\\\" y=\\\"3\\\" width=\\\"7\\\" height=\\\"9\\\" rx=\\\"1.5\\\"\\\/><rect x=\\\"14\\\" y=\\\"3\\\" width=\\\"7\\\" height=\\\"5\\\" rx=\\\"1.5\\\"\\\/><rect x=\\\"14\\\" y=\\\"12\\\" width=\\\"7\\\" height=\\\"9\\\" rx=\\\"1.5\\\"\\\/><rect x=\\\"3\\\" y=\\\"16\\\" width=\\\"7\\\" height=\\\"5\\\" rx=\\\"1.5\\\"\\\/>',\\n\\t\\t'customer' => '<circle cx=\\\"12\\\" cy=\\\"8\\\" r=\\\"4\\\"\\\/><path d=\\\"M4 21c0-4 3.6-7 8-7s8 3 8 7\\\"\\\/>',\\n\\t\\t'store'    => '<path d=\\\"M3 9l1.5-5h15L21 9\\\"\\\/><path d=\\\"M3 9h18v2a3 3 0 0 1-6 0 3 3 0 0 1-6 0 3 3 0 0 1-6 0z\\\"\\\/><path d=\\\"M5 13v8h14v-8\\\"\\\/><path d=\\\"M10 21v-5h4v5\\\"\\\/>',\\n\\t\\t'product'  => '<path d=\\\"M20.6 13.4 13.4 20.6a2 2 0 0 1-2.8 0L3 13V3h10l7.6 7.6a2 2 0 0 1 0 2.8z\\\"\\\/><circle cx=\\\"7.5\\\" cy=\\\"7.5\\\" r=\\\"1.5\\\"\\\/>',\\n\\t\\t'cart'     => '<circle cx=\\\"9\\\" cy=\\\"20\\\" r=\\\"1.5\\\"\\\/><circle cx=\\\"18\\\" cy=\\\"20\\\" r=\\\"1.5\\\"\\\/><path d=\\\"M2 3h3l2.7 12.4a2 2 0 0 0 2 1.6h8.6a2 2 0 0 0 2-1.5L22 7H6\\\"\\\/>',\\n\\t\\t'chat'     => '<path d=\\\"M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z\\\"\\\/>',\\n\\t\\t'wallet'   => '<path d=\\\"M3 7a2 2 0 0 1 2-2h13v4\\\"\\\/><rect x=\\\"3\\\" y=\\\"7\\\" width=\\\"18\\\" height=\\\"13\\\" rx=\\\"2\\\"\\\/><circle cx=\\\"16.5\\\" cy=\\\"13.5\\\" r=\\\"1.3\\\"\\\/>',\\n\\t\\t'star'     => '<path d=\\\"m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.3 6.4 20.2l1.1-6.2L3 9.6l6.2-.9z\\\"\\\/>',\\n\\t\\t'register' => '<rect x=\\\"3\\\" y=\\\"4\\\" width=\\\"18\\\" height=\\\"12\\\" rx=\\\"2\\\"\\\/><path d=\\\"M7 20h10M12 16v4M7 8h4M7 11h2\\\"\\\/>',\\n\\t\\t'link'     => '<path d=\\\"M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1\\\"\\\/><path d=\\\"M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1\\\"\\\/>',\\n\\t\\t'cube'     => '<path d=\\\"M12 2 21 7v10l-9 5-9-5V7z\\\"\\\/><path d=\\\"m3 7 9 5 9-5M12 12v10\\\"\\\/>',\\n\\t\\t'ar'       => '<path d=\\\"M3 7V4h3M21 7V4h-3M3 17v3h3M21 17v3h-3\\\"\\\/><rect x=\\\"8\\\" y=\\\"8\\\" width=\\\"8\\\" height=\\\"8\\\" rx=\\\"1.5\\\"\\\/>',\\n\\t\\t'rx'       => '<path d=\\\"M9 3h6v4H9z\\\"\\\/><path d=\\\"M7 5H5v16h14V5h-2\\\"\\\/><path d=\\\"M9 12h6M9 16h4\\\"\\\/>',\\n\\t\\t'phone'    => '<rect x=\\\"6\\\" y=\\\"2\\\" width=\\\"12\\\" height=\\\"20\\\" rx=\\\"3\\\"\\\/><path d=\\\"M11 18h2\\\"\\\/>',\\n\\t\\t'orders'   => '<path d=\\\"M4 7 12 3l8 4v10l-8 4-8-4z\\\"\\\/><path d=\\\"m4 7 8 4 8-4M12 11v10\\\"\\\/>',\\n\\t\\t'calendar' => '<rect x=\\\"3\\\" y=\\\"5\\\" width=\\\"18\\\" height=\\\"16\\\" rx=\\\"2\\\"\\\/><path d=\\\"M3 10h18M8 3v4M16 3v4\\\"\\\/>',\\n\\t\\t'clock'    => '<circle cx=\\\"12\\\" cy=\\\"13\\\" r=\\\"8\\\"\\\/><path d=\\\"M12 9v4l2.5 2.5M9 2h6\\\"\\\/>',\\n\\t\\t'mail'     => '<rect x=\\\"3\\\" y=\\\"5\\\" width=\\\"18\\\" height=\\\"14\\\" rx=\\\"2\\\"\\\/><path d=\\\"m3 7 9 6 9-6\\\"\\\/>',\\n\\t\\t'chart'    => '<path d=\\\"M3 3v18h18\\\"\\\/><path d=\\\"m7 15 4-4 3 3 5-6\\\"\\\/>',\\n\\t\\t'card'     => '<rect x=\\\"2\\\" y=\\\"5\\\" width=\\\"20\\\" height=\\\"14\\\" rx=\\\"2\\\"\\\/><path d=\\\"M2 10h20M6 15h4\\\"\\\/>',\\n\\t\\t'scan'     => '<path d=\\\"M3 7V5a2 2 0 0 1 2-2h2M17 3h2a2 2 0 0 1 2 2v2M21 17v2a2 2 0 0 1-2 2h-2M7 21H5a2 2 0 0 1-2-2v-2M7 8v8M11 8v8M14 8v8M17 8v8\\\"\\\/>',\\n\\t\\t'receipt'  => '<path d=\\\"M5 3h14v18l-3-2-2 2-2-2-2 2-2-2-3 2z\\\"\\\/><path d=\\\"M9 8h6M9 12h6\\\"\\\/>',\\n\\t\\t'heart'    => '<path d=\\\"M12 21s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 11c0 5.6-7 10-7 10z\\\"\\\/>',\\n\\t\\t'upload'   => '<path d=\\\"M12 16V4M7 9l5-5 5 5\\\"\\\/><path d=\\\"M4 16v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3\\\"\\\/>',\\n\\t\\t'lock'     => '<rect x=\\\"4\\\" y=\\\"11\\\" width=\\\"16\\\" height=\\\"10\\\" rx=\\\"2\\\"\\\/><path d=\\\"M8 11V7a4 4 0 0 1 8 0v4\\\"\\\/>',\\n\\t\\t'shield'   => '<path d=\\\"M12 3 4 6v6c0 4.5 3.4 8 8 9 4.6-1 8-4.5 8-9V6z\\\"\\\/><path d=\\\"m8.5 12 2.5 2.5 4.5-5\\\"\\\/>',\\n\\t\\t'wifi'     => '<path d=\\\"M2 8.8a15 15 0 0 1 20 0M5 12.5a10 10 0 0 1 14 0M8.5 16a5 5 0 0 1 7 0\\\"\\\/><circle cx=\\\"12\\\" cy=\\\"19.5\\\" r=\\\"1\\\"\\\/>',\\n\\t\\t'bell'     => '<path d=\\\"M6 8a6 6 0 0 1 12 0c0 7 3 8 3 8H3s3-1 3-8\\\"\\\/><path d=\\\"M10.3 21a1.9 1.9 0 0 0 3.4 0\\\"\\\/>',\\n\\t\\t'gift'     => '<rect x=\\\"3\\\" y=\\\"8\\\" width=\\\"18\\\" height=\\\"13\\\" rx=\\\"2\\\"\\\/><path d=\\\"M3 12h18M12 8v13M12 8C10 5 7 5 7 7s3 1 5 1c2 0 5 1 5-1s-3-2-5 1\\\"\\\/>',\\n\\t\\t'bolt'     => '<path d=\\\"M13 2 4 14h7l-1 8 9-12h-7z\\\"\\\/>',\\n\\t\\t'ask'      => '<circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"9\\\"\\\/><path d=\\\"M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.7.3-1 .9-1 1.7M12 17h.01\\\"\\\/>',\\n\\t\\t'check'    => '<path d=\\\"m5 12 5 5 9-10\\\"\\\/>',\\n\\t\\t'pay'      => '<rect x=\\\"3\\\" y=\\\"6\\\" width=\\\"18\\\" height=\\\"13\\\" rx=\\\"2\\\"\\\/><path d=\\\"M3 10h18M7 15h3\\\"\\\/>',\\n\\t];\\n\\treturn '<svg viewBox=\\\"0 0 24 24\\\" width=\\\"' . (int) $size . '\\\" height=\\\"' . (int) $size . '\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"1.7\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" aria-hidden=\\\"true\\\">' . ( $paths[ $name ] ?? $paths['store'] ) . '<\\\/svg>';\\n}\\n\\n\\\/** Product photo URL (for hero_img and tile img). *\\\/\\nfunction ddwc_demo_kit_img( $product_id, $size = 'large' ) {\\n\\treturn wp_get_attachment_image_url( get_post_thumbnail_id( $product_id ), $size );\\n}\\n\\n\\\/**\\n * Brand the store: Apple's neutral system (SF Pro via the system font stack, #1d1d1f \\\/ #6e6e73 \\\/ #f5f5f7)\\n * with one accent colour per brand. Global CSS goes in an mu-plugin so the seed may still use Additional CSS.\\n *\\n * @param array $a accent (hex), css (extra CSS appended after the kit CSS).\\n *\\\/\\nfunction ddwc_demo_kit_style( $a ) {\\n\\t$a      = array_merge( [ 'accent' => '#0071e3', 'css' => '' ], $a );\\n\\t$accent = $a['accent'];\\n\\t$rgb    = sscanf( $accent, '#%02x%02x%02x' );\\n\\t$dark   = vsprintf( '#%02x%02x%02x', array_map( function ( $c ) { return (int) round( $c * 0.84 ); }, $rgb ) );\\n\\t$tint   = vsprintf( 'rgba(%d,%d,%d,.1)', $rgb );\\n\\t$stack  = '-apple-system,BlinkMacSystemFont,\\\"SF Pro Text\\\",\\\"SF Pro Display\\\",\\\"Helvetica Neue\\\",Helvetica,Arial,sans-serif';\\n\\n\\t$colors  = [ $accent, $dark, '#1d1d1f', '#1d1d1f', '#6e6e73', '#86868b', '#d2d2d7', '#f5f5f7', '#ffffff', '#ffffff', '#248a3d', '#0071e3', '#d70015', '#bf4800', '#b25e09' ];\\n\\t$palette = [];\\n\\tforeach ( $colors as $i => $color ) {\\n\\t\\t$palette[] = [ 'color' => $color, 'slug' => 'palette' . ( $i + 1 ), 'name' => 'Palette Color ' . ( $i + 1 ) ];\\n\\t}\\n\\tupdate_option( 'kadence_global_palette', wp_json_encode( [ 'palette' => $palette, 'second-palette' => $palette, 'third-palette' => $palette, 'active' => 'palette' ] ) );\\n\\n\\tset_theme_mod( 'base_font', [ 'family' => $stack, 'google' => false, 'weight' => '400', 'variant' => 'regular', 'size' => [ 'desktop' => 17 ], 'lineHeight' => [ 'desktop' => 1.47 ], 'color' => 'palette4' ] );\\n\\tset_theme_mod( 'heading_font', [ 'family' => $stack, 'google' => false, 'weight' => '600', 'variant' => [ '600' ] ] );\\n\\tforeach ( [ 'h1_font' => [ 48, 1.08 ], 'h2_font' => [ 40, 1.1 ], 'h3_font' => [ 28, 1.14 ], 'h4_font' => [ 21, 1.2 ], 'h5_font' => [ 17, 1.3 ], 'h6_font' => [ 14, 1.4 ] ] as $mod => $size ) {\\n\\t\\tset_theme_mod( $mod, [ 'size' => [ 'desktop' => $size[0] ], 'lineHeight' => [ 'desktop' => $size[1] ], 'family' => 'inherit', 'google' => false, 'weight' => '600', 'variant' => '600', 'color' => 'palette3' ] );\\n\\t}\\n\\tset_theme_mod( 'load_fonts_local', false );\\n\\n\\tset_theme_mod( 'site_background', [ 'desktop' => [ 'color' => 'palette9' ] ] );\\n\\tset_theme_mod( 'content_background', [ 'desktop' => [ 'color' => 'palette9' ] ] );\\n\\tset_theme_mod( 'page_content_style', 'unboxed' );\\n\\tset_theme_mod( 'product_archive_content_style', 'unboxed' );\\n\\tset_theme_mod( 'product_content_style', 'unboxed' );\\n\\tset_theme_mod( 'product_archive_columns', '4' );\\n\\tset_theme_mod( 'buttons_border_radius', [ 'size' => [ 980, 980, 980, 980 ], 'unit' => 'px', 'locked' => true ] );\\n\\tset_theme_mod( 'buttons_typography', [ 'size' => [ 'desktop' => 15 ], 'family' => 'inherit', 'weight' => '400', 'variant' => 'regular', 'letterSpacing' => [ 'desktop' => -0.01 ], 'letterType' => 'em' ] );\\n\\tset_theme_mod( 'buttons_padding', [ 'size' => [ 'desktop' => [ 11, 22, 11, 22 ] ], 'unit' => [ 'desktop' => 'px' ], 'locked' => [ 'desktop' => false ] ] );\\n\\n\\t\\\/\\\/ Header: one slim frosted bar, logo left, menu and bag right.\\n\\tset_theme_mod(\\n\\t\\t'header_desktop_items',\\n\\t\\t[\\n\\t\\t\\t'top'    => [ 'top_left' => [], 'top_left_center' => [], 'top_center' => [], 'top_right_center' => [], 'top_right' => [] ],\\n\\t\\t\\t'main'   => [ 'main_left' => [ 'logo' ], 'main_left_center' => [], 'main_center' => [], 'main_right_center' => [], 'main_right' => [ 'navigation', 'cart' ] ],\\n\\t\\t\\t'bottom' => [ 'bottom_left' => [], 'bottom_left_center' => [], 'bottom_center' => [], 'bottom_right_center' => [], 'bottom_right' => [] ],\\n\\t\\t]\\n\\t);\\n\\tset_theme_mod( 'header_sticky', 'main' );\\n\\tset_theme_mod( 'header_main_height', [ 'size' => [ 'mobile' => 52, 'tablet' => 52, 'desktop' => 52 ], 'unit' => [ 'mobile' => 'px', 'tablet' => 'px', 'desktop' => 'px' ] ] );\\n\\tset_theme_mod( 'header_main_background', [ 'desktop' => [ 'color' => 'rgba(255,255,255,0.8)' ] ] );\\n\\tset_theme_mod( 'header_sticky_background', [ 'desktop' => [ 'color' => 'rgba(255,255,255,0.8)' ] ] );\\n\\tset_theme_mod( 'header_main_bottom_border', [ 'desktop' => [ 'width' => 1, 'unit' => 'px', 'style' => 'solid', 'color' => 'rgba(0,0,0,0.08)' ] ] );\\n\\tset_theme_mod( 'brand_typography', [ 'size' => [ 'desktop' => 19 ], 'family' => 'inherit', 'google' => false, 'weight' => '600', 'variant' => '600', 'letterSpacing' => [ 'desktop' => -0.02 ], 'letterType' => 'em', 'color' => 'palette3' ] );\\n\\tset_theme_mod( 'primary_navigation_typography', [ 'size' => [ 'desktop' => 13 ], 'family' => 'inherit', 'weight' => '400', 'variant' => 'regular' ] );\\n\\tset_theme_mod( 'primary_navigation_color', [ 'color' => 'palette4', 'hover' => 'palette1', 'active' => 'palette3' ] );\\n\\n\\tset_theme_mod( 'page_title_layout', 'above' );\\n\\tset_theme_mod( 'page_title_background', [ 'desktop' => [ 'color' => 'palette8' ] ] );\\n\\tset_theme_mod( 'product_archive_title_background', [ 'desktop' => [ 'color' => 'palette8' ] ] );\\n\\tset_theme_mod( 'footer_html_content', '{copyright} {year} {site-title}. A DevDiggers live demo store.' );\\n\\tset_theme_mod( 'footer_bottom_background', [ 'desktop' => [ 'color' => 'palette8' ] ] );\\n\\n\\t$css = <<<'DDWCCSS'\\n:root{--dk-accent:__A__;--dk-accent-dark:__D__;--dk-tint:__T__;--dk-ink:#1d1d1f;--dk-gray:#6e6e73;--dk-line:#d2d2d7;--dk-fog:#f5f5f7;--dk-ease:cubic-bezier(.25,.1,.25,1)}\\nbody{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:-.022em;color:var(--dk-ink)}\\nh1,h2,h3,h4{letter-spacing:-.015em}\\na{color:var(--dk-accent)}\\n#masthead .site-main-header-wrap,#masthead .item-is-fixed{-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}\\n.main-navigation .primary-menu-container>ul>li.menu-item>a{padding-left:.9em;padding-right:.9em;opacity:.85}\\n.main-navigation .primary-menu-container>ul>li.menu-item>a:hover{opacity:1}\\n.button,button.button,.wp-element-button,input[type=submit],.woocommerce a.button,.woocommerce button.button{background:var(--dk-accent);color:#fff;border:0;box-shadow:none!important;transition:background .2s var(--dk-ease)}\\n.button:hover,.wp-element-button:hover,input[type=submit]:hover,.woocommerce a.button:hover,.woocommerce button.button:hover{background:var(--dk-accent-dark);color:#fff}\\ninput[type=text],input[type=email],input[type=tel],input[type=password],input[type=number],input[type=search],textarea,select{border:1px solid var(--dk-line)!important;border-radius:12px!important;padding:12px 14px!important;background:#fff!important;font-size:17px;transition:border-color .2s,box-shadow .2s}\\ninput:focus,textarea:focus,select:focus{border-color:var(--dk-accent)!important;box-shadow:0 0 0 4px var(--dk-tint)!important;outline:0}\\n.entry-hero .entry-header,.page-title{padding-top:56px;padding-bottom:40px}\\n.entry-hero h1,.page-title h1,.woocommerce-products-header__title{font-size:48px;letter-spacing:-.02em}\\n.woocommerce-store-notice{display:none!important}\\n.woocommerce-message,.woocommerce-info,.woocommerce-error{border:0!important;border-radius:14px;background:var(--dk-fog)!important;color:var(--dk-ink)}\\n\\\/* Product cards, Apple Store style. *\\\/\\nul.products li.product{background:#fff;border-radius:18px;padding:0 0 22px;overflow:hidden;box-shadow:0 2px 12px rgba(0,0,0,.08);transition:box-shadow .3s var(--dk-ease),transform .3s var(--dk-ease)}\\nul.products li.product:hover{box-shadow:0 10px 34px rgba(0,0,0,.14);transform:translateY(-2px)}\\nul.products li.product img{border-radius:0!important;aspect-ratio:1\\\/1;object-fit:cover;margin:0!important}\\nul.products li.product .woocommerce-loop-product__title,ul.products li.product .product-details,ul.products li.product .entry-content-wrap{padding-left:20px;padding-right:20px}\\nul.products li.product .woocommerce-loop-product__title{font-size:17px;font-weight:600;margin-top:16px}\\nul.products li.product .price{color:var(--dk-gray);font-size:15px;font-weight:400}\\nul.products li.product .button{font-size:14px;padding:8px 16px}\\nul.products li.product .onsale{border-radius:980px;background:var(--dk-accent);font-weight:600;font-size:12px}\\n.single-product div.product .product_title{font-size:40px;letter-spacing:-.02em}\\n.single-product div.product .price{font-size:21px;color:var(--dk-ink)}\\n.single-product div.product .woocommerce-product-gallery img{border-radius:24px}\\n\\\/* My account, as a settings sidebar. *\\\/\\n.woocommerce-MyAccount-navigation ul{background:var(--dk-fog);border-radius:18px;padding:8px!important}\\n.woocommerce-MyAccount-navigation ul li{border:0!important}\\n.woocommerce-MyAccount-navigation ul li a{display:block;padding:10px 14px!important;border-radius:10px;color:var(--dk-ink)!important;font-size:15px}\\n.woocommerce-MyAccount-navigation ul li.is-active a{background:#fff;font-weight:600;box-shadow:0 1px 4px rgba(0,0,0,.08)}\\ntable.shop_table{border-radius:18px!important;border-color:var(--dk-line)!important;overflow:hidden}\\n.site-footer{font-size:12px;color:var(--dk-gray)}\\n\\\/* Home page building blocks. *\\\/\\n.dk-wrap{max-width:1180px;margin:0 auto;padding-left:22px;padding-right:22px}\\n.dk-hero{text-align:center;padding-top:72px}\\n.dk-eyebrow{display:inline-block;color:var(--dk-accent);font-size:17px;font-weight:600;letter-spacing:-.01em;margin-bottom:10px}\\n.dk-hero h1{font-size:clamp(44px,7vw,80px);line-height:1.05;letter-spacing:-.025em;margin:0 auto 14px!important;max-width:16ch;text-wrap:balance}\\n.dk-lead{font-size:clamp(19px,2.2vw,24px);line-height:1.38;color:var(--dk-gray);max-width:36em;margin:0 auto 28px!important;text-wrap:pretty;letter-spacing:-.015em}\\n.dk-ctas{display:flex;gap:28px;justify-content:center;align-items:center;flex-wrap:wrap}\\n.dk-btn{display:inline-flex;align-items:center;padding:12px 24px;border-radius:980px;background:var(--dk-accent);color:#fff!important;font-size:17px;text-decoration:none!important;transition:background .2s var(--dk-ease)}\\n.dk-btn:hover{background:var(--dk-accent-dark)}\\n.dk-btn.is-light{background:#fff;color:var(--dk-ink)!important}.dk-btn.is-light:hover{background:#e8e8ed}\\n.dk-more{font-size:17px;color:var(--dk-accent)!important;text-decoration:none!important}\\n.dk-more:after{content:\\\"\\\\203A\\\";display:inline-block;margin-left:6px;font-size:1.2em;line-height:0;transition:transform .2s var(--dk-ease)}\\n.dk-more:hover{text-decoration:underline!important}.dk-more:hover:after{transform:translateX(3px)}\\n.dk-stage{position:relative;margin:56px auto 0;max-width:1180px;border-radius:32px;overflow:hidden;background:var(--dk-fog);aspect-ratio:16\\\/9}\\n.dk-stage>img{width:100%;height:100%;object-fit:cover;display:block}\\n.dk-stage.is-trio{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;background:#fff}\\n.dk-stage.is-trio>img{min-width:0}\\n.dk-stage .dk-widget{position:absolute;right:32px;bottom:32px}\\n.dk-widget{width:330px;max-width:calc(100% - 32px);text-align:left;padding:18px;border-radius:22px;background:rgba(255,255,255,.78);-webkit-backdrop-filter:saturate(180%) blur(24px);backdrop-filter:saturate(180%) blur(24px);box-shadow:0 22px 60px rgba(0,0,0,.18),inset 0 0 0 .5px rgba(255,255,255,.6);color:var(--dk-ink);font-size:15px;line-height:1.35}\\n.dk-w-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}\\n.dk-w-app{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:var(--dk-accent);color:#fff}\\n.dk-w-app svg{width:19px;height:19px}\\n.dk-w-label{display:block;font-size:12px;font-weight:600;color:var(--dk-gray);letter-spacing:0;text-transform:uppercase}\\n.dk-w-title{display:block;font-size:16px;font-weight:600;letter-spacing:-.02em}\\n.dk-w-big{display:block;font-size:40px;font-weight:600;letter-spacing:-.03em;line-height:1.1;margin:4px 0}\\n.dk-w-row{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-top:.5px solid rgba(0,0,0,.12);font-size:14px}\\n.dk-w-row span:last-child{color:var(--dk-gray)}\\n.dk-w-row.is-total{font-weight:600}.dk-w-row.is-total span:last-child{color:var(--dk-ink)}\\n.dk-w-pill{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:980px;background:var(--dk-tint);color:var(--dk-accent);font-size:13px;font-weight:600}\\n.dk-w-avatar{flex:none;width:34px;height:34px;border-radius:50%;object-fit:cover}\\n.dk-w-bubble{padding:10px 14px;border-radius:18px 18px 18px 6px;background:#e9e9eb;font-size:15px;margin-top:6px}\\n.dk-w-bubble.is-me{border-radius:18px 18px 6px 18px;background:var(--dk-accent);color:#fff;margin-left:30px}\\n.dk-w-note{display:block;font-size:12px;color:var(--dk-gray);margin-top:10px}\\n.dk-cd{display:flex;gap:8px;margin:10px 0 4px}.dk-cd span{flex:1;text-align:center;padding:10px 0 8px;border-radius:12px;background:var(--dk-ink);color:#fff;font-size:22px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-.02em}\\n.dk-cd small{display:block;font-size:10px;font-weight:500;color:#a1a1a6;letter-spacing:.04em;text-transform:uppercase;margin-top:3px}\\n.dk-band{background:var(--dk-fog);margin-top:96px;padding:88px 0}\\n.dk-title{text-align:center!important;font-size:clamp(34px,4.6vw,56px);letter-spacing:-.025em;line-height:1.08;margin:0 auto 48px!important;max-width:20ch;text-wrap:balance}\\n.dk-shelf-title{font-size:clamp(28px,3.4vw,40px);letter-spacing:-.02em;line-height:1.1;margin:0 0 28px}\\n.dk-shelf-title span{color:var(--dk-gray)}\\n.dk-features{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}\\n.dk-feature{background:#fff;border-radius:28px;padding:36px 32px 40px}\\n.dk-feature svg{color:var(--dk-accent);width:36px;height:36px}\\n.dk-feature h3{font-size:24px;letter-spacing:-.02em;margin:18px 0 8px}\\n.dk-feature p{margin:0;font-size:17px;color:var(--dk-gray)}\\n.dk-shelf{padding-top:96px}\\n.dk-shelf-head{display:flex;justify-content:space-between;align-items:baseline;gap:16px;flex-wrap:wrap}\\n.dk-tile{margin:96px auto 104px;display:grid;grid-template-columns:1fr 1fr;align-items:center;border-radius:32px;overflow:hidden;background:#000;color:#f5f5f7}\\n.dk-tile-copy{padding:64px}\\n.dk-tile h2{color:#f5f5f7;font-size:clamp(32px,3.8vw,48px);letter-spacing:-.025em;line-height:1.08;margin:0 0 16px}\\n.dk-tile p{color:#a1a1a6;font-size:19px;line-height:1.42}\\n.dk-tile .dk-more{color:#2997ff!important}\\n.dk-tile img{width:100%;height:100%;min-height:440px;max-height:600px;object-fit:cover;display:block}\\n.dk-stats{display:flex;gap:36px;margin:28px 0}.dk-stats b{display:block;font-size:32px;font-weight:600;letter-spacing:-.02em;color:#f5f5f7}.dk-stats span{font-size:14px;color:#a1a1a6}\\n.dk-list{list-style:none;padding:0;margin:24px 0}.dk-list li{display:flex;gap:12px;align-items:center;padding:10px 0;border-top:.5px solid rgba(255,255,255,.16);color:#f5f5f7;font-size:17px}\\n.dk-list li b{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:50%;background:#f5f5f7;color:#000;font-size:13px}\\n@media(max-width:900px){.dk-features,.dk-tile{grid-template-columns:1fr}.dk-stage{aspect-ratio:4\\\/5;border-radius:24px}.dk-stage .dk-widget{left:16px;right:16px;bottom:16px;width:auto}.dk-stage.is-trio{grid-template-columns:1fr 1fr}.dk-stage.is-trio>img:nth-child(3){display:none}.dk-tile-copy{padding:40px 28px}.dk-tile img{min-height:300px}.dk-band{padding:64px 0}}\\n@media(prefers-reduced-motion:reduce){*{transition:none!important}}\\nDDWCCSS;\\n\\t$css  = str_replace( [ '__A__', '__D__', '__T__' ], [ $accent, $dark, $tint ], $css ) . $a['css'];\\n\\t$code = \\\"<?php\\\\n\\\/\\\/ Live Preview only: the demo kit's global stylesheet.\\\\nadd_action( 'wp_head', function () { echo '<style id=\\\\\\\"ddwc-demo-kit\\\\\\\">' . \\\" . var_export( $css, true ) . \\\" . '<\\\/style>'; }, 99 );\\\\n\\\";\\n\\twp_mkdir_p( WPMU_PLUGIN_DIR );\\n\\tfile_put_contents( WPMU_PLUGIN_DIR . '\\\/demo-style.php', $code );\\n}\\n\\n\\\/**\\n * Build the home page and make it the front page.\\n *\\n * @param array $h eyebrow, title, lead, ctas [ [label, url], [label, url] ] (first is the filled button),\\n *                 hero_img (url, or three urls for a photo trio), hero_alt, widget (HTML on the hero stage), after_ctas (HTML, e.g. a shortcode),\\n *                 features_title, features [ [title, text, icon] ], shelf_title, shelf_sub, shelf (shortcode),\\n *                 shelf_more [label, url], tile [title, text, cta [label, url], img, alt, extra HTML], script.\\n * @return int Page ID.\\n *\\\/\\nfunction ddwc_demo_kit_home( $h ) {\\n\\t$ctas = '';\\n\\tforeach ( $h['ctas'] as $i => $cta ) {\\n\\t\\t$ctas .= '<a class=\\\"' . ( $i ? 'dk-more' : 'dk-btn' ) . '\\\" href=\\\"' . esc_url( $cta[1] ) . '\\\">' . esc_html( $cta[0] ) . '<\\\/a>';\\n\\t}\\n\\t$features = '';\\n\\tforeach ( $h['features'] as $f ) {\\n\\t\\t$features .= '<div class=\\\"dk-feature\\\">' . ddwc_demo_kit_icon( $f[2], 36 ) . '<h3>' . $f[0] . '<\\\/h3><p>' . $f[1] . '<\\\/p><\\\/div>';\\n\\t}\\n\\t\\\/\\\/ One wide photo, or three product photos side by side (works with portrait shots).\\n\\t$trio = is_array( $h['hero_img'] );\\n\\t$imgs = '';\\n\\tforeach ( (array) $h['hero_img'] as $src ) {\\n\\t\\t$imgs .= '<img src=\\\"' . esc_url( $src ) . '\\\" alt=\\\"' . esc_attr( $h['hero_alt'] ) . '\\\"\\\/>';\\n\\t}\\n\\t$t    = $h['tile'];\\n\\t$more = $h['shelf_more'] ?? [ 'View all products', wc_get_page_permalink( 'shop' ) ];\\n\\t$html = '<!-- wp:html --><section class=\\\"dk-hero dk-wrap\\\"><span class=\\\"dk-eyebrow\\\">' . $h['eyebrow'] . '<\\\/span><h1>' . $h['title'] . '<\\\/h1><p class=\\\"dk-lead\\\">' . $h['lead'] . '<\\\/p><div class=\\\"dk-ctas\\\">' . $ctas . ( $h['after_ctas'] ?? '' ) . '<\\\/div>'\\n\\t\\t. '<div class=\\\"dk-stage' . ( $trio ? ' is-trio' : '' ) . '\\\">' . $imgs . $h['widget'] . '<\\\/div><\\\/section><!-- \\\/wp:html -->'\\n\\t\\t. '<!-- wp:html --><section class=\\\"dk-band\\\"><div class=\\\"dk-wrap\\\"><h2 class=\\\"dk-title\\\">' . $h['features_title'] . '<\\\/h2><div class=\\\"dk-features\\\">' . $features . '<\\\/div><\\\/div><\\\/section><!-- \\\/wp:html -->'\\n\\t\\t. '<!-- wp:html --><section class=\\\"dk-shelf dk-wrap\\\"><div class=\\\"dk-shelf-head\\\"><h2 class=\\\"dk-shelf-title\\\">' . $h['shelf_title'] . ' <span>' . $h['shelf_sub'] . '<\\\/span><\\\/h2><a class=\\\"dk-more\\\" href=\\\"' . esc_url( $more[1] ) . '\\\">' . esc_html( $more[0] ) . '<\\\/a><\\\/div><!-- \\\/wp:html -->'\\n\\t\\t. '<!-- wp:shortcode -->' . $h['shelf'] . '<!-- \\\/wp:shortcode -->'\\n\\t\\t. '<!-- wp:html --><\\\/section><!-- \\\/wp:html -->'\\n\\t\\t. '<!-- wp:html --><section class=\\\"dk-wrap\\\"><div class=\\\"dk-tile\\\"><div class=\\\"dk-tile-copy\\\"><h2>' . $t['title'] . '<\\\/h2><p>' . $t['text'] . '<\\\/p>' . ( $t['extra'] ?? '' ) . '<p><a class=\\\"dk-btn is-light\\\" href=\\\"' . esc_url( $t['cta'][1] ) . '\\\">' . esc_html( $t['cta'][0] ) . '<\\\/a><\\\/p><\\\/div><img src=\\\"' . esc_url( $t['img'] ) . '\\\" alt=\\\"' . esc_attr( $t['alt'] ) . '\\\"\\\/><\\\/div><\\\/section>' . ( $h['script'] ?? '' ) . '<!-- \\\/wp:html -->';\\n\\n\\t$id = wp_insert_post( [ 'post_type' => 'page', 'post_status' => 'publish', 'post_title' => 'Home', 'post_content' => $html ] );\\n\\tforeach ( [ '_kad_post_title' => 'hide', '_kad_post_layout' => 'fullwidth', '_kad_post_content_style' => 'unboxed', '_kad_post_vertical_padding' => 'hide', '_kad_post_feature' => 'hide' ] as $k => $v ) {\\n\\t\\tupdate_post_meta( $id, $k, $v );\\n\\t}\\n\\tupdate_option( 'show_on_front', 'page' );\\n\\tupdate_option( 'page_on_front', $id );\\n\\twp_delete_post( 2, true ); \\\/\\\/ Sample Page.\\n\\twp_delete_post( 1, true ); \\\/\\\/ Hello world.\\n\\tupdate_option( 'permalink_structure', '\\\/%postname%\\\/' );\\n\\tflush_rewrite_rules();\\n\\treturn $id;\\n}\\n\\n\\\/**\\n * Primary menu.\\n *\\n * @param array $items label => url.\\n *\\\/\\nfunction ddwc_demo_kit_menu( $items ) {\\n\\t$menu_id = wp_create_nav_menu( 'Main menu' );\\n\\tif ( is_wp_error( $menu_id ) ) {\\n\\t\\t$menu_id = wp_get_nav_menu_object( 'Main menu' )->term_id;\\n\\t}\\n\\tforeach ( $items as $label => $url ) {\\n\\t\\twp_update_nav_menu_item( $menu_id, 0, [ 'menu-item-title' => $label, 'menu-item-url' => $url, 'menu-item-status' => 'publish', 'menu-item-type' => 'custom' ] );\\n\\t}\\n\\t$locations            = get_theme_mod( 'nav_menu_locations', [] );\\n\\t$locations['primary'] = $menu_id;\\n\\t$locations['mobile']  = $menu_id;\\n\\tset_theme_mod( 'nav_menu_locations', $locations );\\n}\\n\\n\\\/**\\n * Write the \\\"View as\\\" switcher mu-plugin.\\n *\\n * Pass a PHP expression string that returns the views array; each view:\\n *   [ 'label' => 'Store admin', 'hint' => 'Dashboard & settings', 'icon' => 'admin', 'user' => 'admin', 'url' => admin_url(...) ]\\n * user '' logs the visitor out. icon: any ddwc_demo_kit_icon() name.\\n *\\n * @param string $views_php PHP code (no <?php) that returns the array.\\n *\\\/\\nfunction ddwc_demo_kit_switcher( $views_php ) {\\n\\t$icons = [];\\n\\tforeach ( [ 'admin', 'customer', 'store', 'product', 'cart', 'chat', 'wallet', 'star', 'register', 'link', 'cube', 'rx', 'phone', 'orders', 'calendar' ] as $n ) {\\n\\t\\t$icons[ $n ] = ddwc_demo_kit_icon( $n, 18 );\\n\\t}\\n\\t$code = <<<'DDWCKIT'\\n<?php\\n\\\/**\\n * Live Preview only: \\\"View as\\\" switcher so visitors can jump between the store owner's\\n * admin and the shopper's side without any password.\\n *\\\/\\nfunction ddwc_demo_switcher_views() {\\n\\t__VIEWS__\\n}\\n\\nadd_action(\\n\\t'init',\\n\\tfunction () {\\n\\t\\tif ( ! isset( $_GET['ddwc_demo_view'] ) ) { \\\/\\\/ phpcs:ignore WordPress.Security.NonceVerification -- demo site only.\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\t$views = ddwc_demo_switcher_views();\\n\\t\\t$view  = $views[ absint( $_GET['ddwc_demo_view'] ) ] ?? null; \\\/\\\/ phpcs:ignore WordPress.Security.NonceVerification\\n\\t\\tif ( ! $view ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\twp_clear_auth_cookie();\\n\\t\\twp_set_current_user( 0 );\\n\\t\\t$user = $view['user'] ? get_user_by( 'login', $view['user'] ) : null;\\n\\t\\tif ( $user ) {\\n\\t\\t\\twp_set_current_user( $user->ID );\\n\\t\\t\\twp_set_auth_cookie( $user->ID, true );\\n\\t\\t}\\n\\t\\twp_safe_redirect( $view['url'] );\\n\\t\\texit;\\n\\t},\\n\\t1\\n);\\n\\n\\\/\\\/ Live Preview: keep the storefront clean, the admin bar only appears in wp-admin.\\nadd_filter( 'show_admin_bar', '__return_false' );\\n\\nfunction ddwc_demo_switcher_render() {\\n\\t$icons   = __ICONS__;\\n\\t$views   = ddwc_demo_switcher_views();\\n\\t$current = wp_get_current_user();\\n\\t$here    = untrailingslashit( set_url_scheme( 'http:\\\/\\\/' . ( $_SERVER['HTTP_HOST'] ?? '' ) . ( $_SERVER['REQUEST_URI'] ?? '' ) ) ); \\\/\\\/ phpcs:ignore\\n\\t$items   = '';\\n\\t$label   = '';\\n\\tforeach ( $views as $i => $view ) {\\n\\t\\t$active = untrailingslashit( set_url_scheme( $view['url'] ) ) === $here && ( ! $view['user'] || ( $current->exists() && $current->user_login === $view['user'] ) );\\n\\t\\tif ( $active ) {\\n\\t\\t\\t$label = $view['label'];\\n\\t\\t}\\n\\t\\t$items .= sprintf(\\n\\t\\t\\t'<a href=\\\"%s\\\" class=\\\"ddwc-ds-item%s\\\"><span class=\\\"ddwc-ds-ico\\\">%s<\\\/span><span class=\\\"ddwc-ds-text\\\"><strong>%s<\\\/strong><small>%s<\\\/small><\\\/span><\\\/a>',\\n\\t\\t\\tesc_url( add_query_arg( 'ddwc_demo_view', $i, home_url( '\\\/' ) ) ),\\n\\t\\t\\t$active ? ' is-active' : '',\\n\\t\\t\\t$icons[ $view['icon'] ?? 'store' ] ?? $icons['store'],\\n\\t\\t\\tesc_html( $view['label'] ),\\n\\t\\t\\tesc_html( $view['hint'] ?? '' )\\n\\t\\t);\\n\\t}\\n\\t?>\\n\\t<div id=\\\"ddwc-demo-switcher\\\">\\n\\t\\t<div class=\\\"ddwc-ds-panel\\\" role=\\\"menu\\\">\\n\\t\\t\\t<div class=\\\"ddwc-ds-head\\\">Explore this live demo<\\\/div>\\n\\t\\t\\t<?php echo $items; \\\/\\\/ phpcs:ignore WordPress.Security.EscapeOutput -- escaped above. ?>\\n\\t\\t<\\\/div>\\n\\t\\t<button type=\\\"button\\\" class=\\\"ddwc-ds-toggle\\\" aria-expanded=\\\"false\\\">\\n\\t\\t\\t<span class=\\\"ddwc-ds-dot\\\"><\\\/span>\\n\\t\\t\\t<span>View as<?php echo $label ? ' <b>' . esc_html( $label ) . '<\\\/b>' : ''; ?><\\\/span>\\n\\t\\t\\t<svg viewBox=\\\"0 0 24 24\\\" width=\\\"14\\\" height=\\\"14\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2.2\\\" stroke-linecap=\\\"round\\\" aria-hidden=\\\"true\\\"><path d=\\\"m6 15 6-6 6 6\\\"\\\/><\\\/svg>\\n\\t\\t<\\\/button>\\n\\t<\\\/div>\\n\\t<style>\\n\\t\\t#ddwc-demo-switcher{position:fixed;left:20px;bottom:20px;z-index:999999;font:400 14px\\\/1.3 -apple-system,BlinkMacSystemFont,\\\"SF Pro Text\\\",\\\"Helvetica Neue\\\",Arial,sans-serif;letter-spacing:-.01em;color:#1d1d1f;-webkit-font-smoothing:antialiased}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-toggle{display:flex;align-items:center;gap:9px;padding:10px 16px;border:0;border-radius:980px;background:rgba(29,29,31,.82);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);color:#f5f5f7;font:inherit;cursor:pointer;box-shadow:0 10px 30px rgba(0,0,0,.24)}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-toggle b{font-weight:600;color:#fff}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-toggle svg{transition:transform .25s cubic-bezier(.25,.1,.25,1);opacity:.7}\\n\\t\\t#ddwc-demo-switcher.is-open .ddwc-ds-toggle svg{transform:rotate(180deg)}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-dot{width:7px;height:7px;border-radius:50%;background:#30d158;box-shadow:0 0 0 3px rgba(48,209,88,.28)}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-panel{position:absolute;left:0;bottom:calc(100% + 10px);width:300px;max-width:calc(100vw - 40px);padding:6px;border-radius:18px;background:rgba(255,255,255,.82);-webkit-backdrop-filter:saturate(180%) blur(24px);backdrop-filter:saturate(180%) blur(24px);box-shadow:0 24px 70px rgba(0,0,0,.22),inset 0 0 0 .5px rgba(0,0,0,.08);opacity:0;visibility:hidden;transform:translateY(6px) scale(.98);transform-origin:bottom left;transition:opacity .2s,transform .25s cubic-bezier(.25,.1,.25,1),visibility .2s}\\n\\t\\t#ddwc-demo-switcher.is-open .ddwc-ds-panel{opacity:1;visibility:visible;transform:none}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-head{padding:10px 12px 8px;font-size:12px;font-weight:600;color:#6e6e73}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-item{display:flex;align-items:center;gap:12px;padding:9px 10px;border-radius:12px;color:#1d1d1f;text-decoration:none}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-item:hover{background:rgba(0,0,0,.05)}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-item.is-active{background:rgba(0,113,227,.1)}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-ico{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:#e8e8ed;color:#1d1d1f}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-item.is-active .ddwc-ds-ico{background:#0071e3;color:#fff}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-text{display:flex;flex-direction:column;min-width:0}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-text strong{font-weight:600;font-size:14px}\\n\\t\\t#ddwc-demo-switcher .ddwc-ds-text small{font-size:12px;color:#6e6e73}\\n\\t\\t@media (max-width:782px){#ddwc-demo-switcher{left:12px;bottom:auto;top:58px}#ddwc-demo-switcher .ddwc-ds-panel{bottom:auto;top:calc(100% + 10px);transform-origin:top left}}\\n\\t<\\\/style>\\n\\t<script>\\n\\t\\t(function(){var w=document.getElementById('ddwc-demo-switcher');if(!w)return;var b=w.querySelector('.ddwc-ds-toggle');b.addEventListener('click',function(e){e.stopPropagation();var o=w.classList.toggle('is-open');b.setAttribute('aria-expanded',o)});document.addEventListener('click',function(e){if(!w.contains(e.target)){w.classList.remove('is-open');b.setAttribute('aria-expanded','false')}});try{if(!sessionStorage.getItem('ddwcDemoSeen')){w.classList.add('is-open');sessionStorage.setItem('ddwcDemoSeen','1');setTimeout(function(){w.classList.remove('is-open');b.setAttribute('aria-expanded','false')},5000)}}catch(e){}})();\\n\\t<\\\/script>\\n\\t<?php\\n}\\nadd_action( 'wp_footer', 'ddwc_demo_switcher_render' );\\nadd_action( 'admin_footer', 'ddwc_demo_switcher_render' );\\nDDWCKIT;\\n\\twp_mkdir_p( WPMU_PLUGIN_DIR );\\n\\tfile_put_contents( WPMU_PLUGIN_DIR . '\\\/demo-switcher.php', str_replace( [ '__VIEWS__', '__ICONS__' ], [ $views_php, var_export( $icons, true ) ], $code ) );\\n}\\n\\n\\nwp_set_current_user( 1 );\\nddwc_demo_kit_style( [ 'accent' => '#b4531a' ] );\\nset_theme_mod( 'product_archive_style', 'action-visible' );\\nset_theme_mod( 'product_archive_button_style', 'button' );\\n\\n$shop    = wc_get_page_permalink( 'shop' );\\n$account = wc_get_page_permalink( 'myaccount' );\\n$try     = get_permalink( $products['vase'] );\\n$clicks  = array_sum( $stats['days'] );\\nddwc_demo_kit_home( [\\n\\t'eyebrow'        => 'Wholesale for registered buyers',\\n\\t'title'          => 'Trade homeware. Prices after you log in.',\\n\\t'lead'           => 'Browse every line freely. Wholesale prices and ordering open up once your trade account is signed in.',\\n\\t'ctas'           => [ [ 'Browse the catalog', $shop ], [ 'See a product as a guest', $try ] ],\\n\\t'hero_img'       => [ ddwc_demo_kit_img( $products['vase'] ), ddwc_demo_kit_img( $products['lamp'] ), ddwc_demo_kit_img( $products['carafe'] ) ],\\n\\t'hero_alt'       => 'Hollis Trade Supply ceramics, lighting and glassware',\\n\\t'widget'         => '<div class=\\\"dk-widget\\\"><div class=\\\"dk-w-head\\\"><span class=\\\"dk-w-app\\\">' . ddwc_demo_kit_icon( 'lock' ) . '<\\\/span><span><span class=\\\"dk-w-label\\\">Guest view<\\\/span><span class=\\\"dk-w-title\\\">Green Lidded Canisters, case of 6<\\\/span><\\\/span><\\\/div>'\\n\\t\\t. '<span class=\\\"dk-w-pill\\\">Trade pricing for registered buyers<\\\/span>'\\n\\t\\t. '<div class=\\\"dk-w-row\\\"><span>Login button clicks, 60 days<\\\/span><b>' . number_format( $clicks ) . '<\\\/b><\\\/div>'\\n\\t\\t. '<span class=\\\"dk-w-note\\\">Add to Cart hidden for guests<\\\/span><\\\/div>',\\n\\t'features_title' => 'Your prices stay with your buyers.',\\n\\t'features'       => [\\n\\t\\t[ 'Hide prices from guests', 'Logged-out visitors see your message instead of the price, on the shop, product pages and search.', 'lock' ],\\n\\t\\t[ 'A login button in its place', 'Add to Cart becomes a login button that opens a popup and brings the buyer back to the same product.', 'customer' ],\\n\\t\\t[ 'No back doors', 'Prices also stay out of schema markup and the Store API, and direct add-to-cart links are blocked.', 'shield' ],\\n\\t],\\n\\t'shelf_title'    => 'This season\\\\'s lines.',\\n\\t'shelf_sub'      => 'Log in to see trade prices.',\\n\\t'shelf'          => '[products limit=\\\"8\\\" columns=\\\"4\\\" orderby=\\\"date\\\"]',\\n\\t'tile'           => [\\n\\t\\t'title' => 'Already a buyer? Your prices are one login away.',\\n\\t\\t'text'  => 'Sign in and every product shows its wholesale price and Add to Cart again.',\\n\\t\\t'cta'   => [ 'Log in', $account ],\\n\\t\\t'img'   => ddwc_demo_kit_img( $products['chair'] ),\\n\\t\\t'alt'   => 'Reading chair by a window',\\n\\t],\\n] );\\nddwc_demo_kit_menu( [ 'Catalog' => $shop, 'My account' => $account ] );\\n\\nforeach ( [ 'cart', 'checkout' ] as $page ) {\\n\\t$pid = wc_get_page_id( $page );\\n\\tif ( $pid > 0 ) {\\n\\t\\twp_update_post( [ 'ID' => $pid, 'post_content' => wp_slash( str_replace( [ '{\\\"align\\\":\\\"wide\\\"}', ' alignwide' ], [ '', '' ], get_post_field( 'post_content', $pid ) ) ) ] );\\n\\t}\\n}\\n\\nupdate_option( 'ddwc_demo_product', $products['vase'] );\\nddwc_demo_kit_switcher( <<<'DDWCVIEWS'\\nreturn [\\n\\t\\t[ 'label' => 'Store owner dashboard', 'hint' => 'Protected products and login button clicks', 'icon' => 'admin', 'user' => 'admin', 'url' => admin_url( 'admin.php?page=ddwchpg-dashboard' ) ],\\n\\t\\t[ 'label' => 'Guest: product page', 'hint' => 'Price and Add to Cart replaced by a login button', 'icon' => 'lock', 'user' => '', 'url' => get_permalink( (int) get_option( 'ddwc_demo_product' ) ) ],\\n\\t\\t[ 'label' => 'Guest: catalog', 'hint' => 'The shop as a logged-out visitor', 'icon' => 'store', 'user' => '', 'url' => wc_get_page_permalink( 'shop' ) ],\\n\\t\\t[ 'label' => 'Buyer: logged in', 'hint' => 'Amara sees trade prices and can order', 'icon' => 'customer', 'user' => 'amara', 'url' => get_permalink( (int) get_option( 'ddwc_demo_product' ) ) ],\\n\\t];\\nDDWCVIEWS\\n);\\n\"},{\"step\":\"login\",\"username\":\"admin\",\"password\":\"password\"}]}"}},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3769320,"resolution":"1","location":"assets","locale":"","width":1600,"height":1000},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3769320,"resolution":"2","location":"assets","locale":"","width":1600,"height":1000},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3769320,"resolution":"3","location":"assets","locale":"","width":1600,"height":1000},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3769320,"resolution":"4","location":"assets","locale":"","width":1600,"height":1000},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3769320,"resolution":"5","location":"assets","locale":"","width":1600,"height":1000},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3769320,"resolution":"6","location":"assets","locale":"","width":1600,"height":1000},"screenshot-7.png":{"filename":"screenshot-7.png","revision":3769320,"resolution":"7","location":"assets","locale":"","width":1600,"height":1000},"screenshot-8.png":{"filename":"screenshot-8.png","revision":3769320,"resolution":"8","location":"assets","locale":"","width":1600,"height":1000},"screenshot-9.png":{"filename":"screenshot-9.png","revision":3769320,"resolution":"9","location":"assets","locale":"","width":1600,"height":1000}},"screenshots":{"1":"The dashboard with protected products, button clicks and why prices are hidden.","2":"A guest sees your message and a login button instead of the price and Add to Cart.","3":"The login popup on the product page, which brings the visitor back to the same product.","4":"The shop as a guest: protected products show your message, an excluded product keeps its price.","5":"General settings: who does not see prices, what to hide and which products.","6":"Exclusions and the protection options for schema markup, the Store API and direct purchases.","7":"Display settings for the price message and the replacement button.","8":"The Price visibility setting on the product edit screen.","9":"The setup wizard."}},"plugin_section":[],"plugin_tags":[65997,174551,13760,236457,51032],"plugin_category":[],"plugin_contributors":[220149],"plugin_business_model":[],"class_list":["post-393224","plugin","type-plugin","status-publish","hentry","plugin_tags-catalog-mode","plugin_tags-hide-add-to-cart","plugin_tags-hide-price","plugin_tags-login-to-see-price","plugin_tags-wholesale","plugin_contributors-devdiggers","plugin_committers-devdiggers"],"banners":{"banner":"https:\/\/ps.w.org\/devdiggers-hide-price-for-woocommerce\/assets\/banner-772x250.png?rev=3769320","banner_2x":"https:\/\/ps.w.org\/devdiggers-hide-price-for-woocommerce\/assets\/banner-1544x500.png?rev=3769320","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/devdiggers-hide-price-for-woocommerce\/assets\/icon-128x128.gif?rev=3769320","icon_2x":"https:\/\/ps.w.org\/devdiggers-hide-price-for-woocommerce\/assets\/icon-256x256.gif?rev=3769320","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/devdiggers-hide-price-for-woocommerce\/assets\/screenshot-1.png?rev=3769320","caption":"The dashboard with protected products, button clicks and why prices are hidden."},{"src":"https:\/\/ps.w.org\/devdiggers-hide-price-for-woocommerce\/assets\/screenshot-2.png?rev=3769320","caption":"A guest sees your message and a login button instead of the price and Add to Cart."},{"src":"https:\/\/ps.w.org\/devdiggers-hide-price-for-woocommerce\/assets\/screenshot-3.png?rev=3769320","caption":"The login popup on the product page, which brings the visitor back to the same product."},{"src":"https:\/\/ps.w.org\/devdiggers-hide-price-for-woocommerce\/assets\/screenshot-4.png?rev=3769320","caption":"The shop as a guest: protected products show your message, an excluded product keeps its price."},{"src":"https:\/\/ps.w.org\/devdiggers-hide-price-for-woocommerce\/assets\/screenshot-5.png?rev=3769320","caption":"General settings: who does not see prices, what to hide and which products."},{"src":"https:\/\/ps.w.org\/devdiggers-hide-price-for-woocommerce\/assets\/screenshot-6.png?rev=3769320","caption":"Exclusions and the protection options for schema markup, the Store API and direct purchases."},{"src":"https:\/\/ps.w.org\/devdiggers-hide-price-for-woocommerce\/assets\/screenshot-7.png?rev=3769320","caption":"Display settings for the price message and the replacement button."},{"src":"https:\/\/ps.w.org\/devdiggers-hide-price-for-woocommerce\/assets\/screenshot-8.png?rev=3769320","caption":"The Price visibility setting on the product edit screen."},{"src":"https:\/\/ps.w.org\/devdiggers-hide-price-for-woocommerce\/assets\/screenshot-9.png?rev=3769320","caption":"The setup wizard."}],"raw_content":"<!--section=description-->\n<p>Some stores should not show prices to everyone. A wholesaler only quotes trade customers. A members club keeps its prices for members. A manufacturer wants dealers to log in before they see a price list. And plenty of shops simply want visitors to create an account before they can buy.<\/p>\n\n<p>Hide Price for WooCommerce is a free <strong><a href=\"https:\/\/devdiggers.com\/product\/woocommerce-hide-price-for-guest\/\">WooCommerce hide price plugin<\/a><\/strong> that hides the price and the Add to Cart button from the visitors you choose, on your whole catalog or only on the products and categories you pick. In their place, visitors see your own message, such as \"Login to view price\", and a button that gives them a next step: a login popup that brings them straight back to the product, or a link to your contact or trade application page.<\/p>\n\n<p>A hidden price is also removed from the product's schema markup and from WooCommerce Store API responses used by block themes, and protected products cannot be added to the cart, so the price stays hidden everywhere the plugin hides it.<\/p>\n\n<h4>Quick links<\/h4>\n\n<ul>\n<li><a href=\"https:\/\/demo.devdiggers.com\/hide-price-for-woocommerce\/\">Free Demo<\/a><\/li>\n<li><a href=\"https:\/\/demo.devdiggers.com\/woocommerce-hide-price-for-guest\/\">Pro Demo<\/a><\/li>\n<li><a href=\"https:\/\/docs.devdiggers.com\/woocommerce-hide-price-for-guest\/\">Documentation<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/support\/plugin\/devdiggers-hide-price-for-woocommerce\/\">Support<\/a><\/li>\n<li><a href=\"https:\/\/devdiggers.com\/product\/woocommerce-hide-price-for-guest\/#free-vs-pro\">Free vs Pro Comparison<\/a><\/li>\n<li><a href=\"https:\/\/devdiggers.com\/product\/woocommerce-hide-price-for-guest\/\">Upgrade to Pro<\/a><\/li>\n<\/ul>\n\n<h4>How it works<\/h4>\n\n<ol>\n<li>Choose who should not see prices: guests, any user role, or both.<\/li>\n<li>Choose where: all products, or selected products and categories.<\/li>\n<li>Write the message shown in place of the price and pick what the button does.<\/li>\n<li>A visitor in that audience sees your message and button instead of the price and Add to Cart.<\/li>\n<li>They log in through the popup and land back on the same product, now with the price.<\/li>\n<\/ol>\n\n<h4>What the free plugin does<\/h4>\n\n<h3>Hide prices for guests or any user role<\/h3>\n\n<ul>\n<li>Hide prices from guests (logged out visitors), the most common setup<\/li>\n<li>Add any WordPress or WooCommerce role, such as Customer or Subscriber, to run a wholesale or members only catalog<\/li>\n<li>Logged in customers outside the audience see your normal store<\/li>\n<\/ul>\n\n<h3>Hide the price, or only the Add to Cart button<\/h3>\n\n<ul>\n<li>Hide the price and the Add to Cart button together<\/li>\n<li>Or keep prices public and hide only Add to Cart, for a catalog that takes orders another way<\/li>\n<\/ul>\n\n<h3>Choose which products are protected<\/h3>\n\n<ul>\n<li>Hide prices on all products, or only on the products and categories you select<\/li>\n<li>Pick single variations of a variable product. The price range of the parent is rebuilt from the variations visitors may see, so a hidden price never shows up in a range<\/li>\n<li>Grouped products get the same treatment<\/li>\n<li>Exclude products or categories that should always show their price<\/li>\n<li>A Price visibility setting on every product edit screen: Always hide price, Always show price, or Follow plugin settings<\/li>\n<\/ul>\n\n<h3>Your message in place of the price<\/h3>\n\n<ul>\n<li>Write your own text, for example \"Login to view price\" or \"Trade prices for members\"<\/li>\n<li>Basic HTML is allowed, so the message can contain a link<\/li>\n<li>Placeholders: {login_url}, {register_url} and {product_name}<\/li>\n<li>Pick a text color and a background color to show the message as a badge<\/li>\n<\/ul>\n\n<h3>A replacement button that keeps the visitor<\/h3>\n\n<ul>\n<li><strong>Login to see the price:<\/strong> opens a login popup on the product page. After logging in, the visitor lands back on the same product. Account registration links to My Account when you allow it<\/li>\n<li><strong>Custom URL:<\/strong> send visitors to a contact page, a wholesale application form or any link you like<\/li>\n<li><strong>No button:<\/strong> just the message<\/li>\n<li>Your own button text, plus extra CSS classes to match your theme's buttons<\/li>\n<li>Logged in visitors never see a login button. When you hide prices from a logged in role, they get a Learn more button to your custom URL instead, such as a trade application page<\/li>\n<\/ul>\n\n<h3>Leak proof price hiding<\/h3>\n\n<ul>\n<li><strong>Block purchases:<\/strong> protected products cannot be bought, even through a direct ?add-to-cart= link, the Cart block or a theme that ignores the hidden button<\/li>\n<li><strong>Search results:<\/strong> the price is removed from the product's schema markup, so Google does not show it in rich results<\/li>\n<li><strong>Blocks and Store API:<\/strong> prices are stripped from WooCommerce Store API responses, which product blocks and headless front ends read. The price range behind the Filter by Price block is withheld too, so it cannot reveal a hidden price<\/li>\n<li>Works on shop pages, category pages, single products, related products and quick view plugins that load products over admin-ajax<\/li>\n<li>Works with classic themes and block themes, including the Add to Cart form block<\/li>\n<\/ul>\n\n<h3>Dashboard and setup wizard<\/h3>\n\n<ul>\n<li>A setup wizard gets you running in four short steps<\/li>\n<li>The dashboard shows how many products are protected, why each one is protected, and how many times visitors clicked the replacement button, with a trend chart and your most clicked products<\/li>\n<li>A checklist on the dashboard shows what is left to set up<\/li>\n<\/ul>\n\n<h4>Who this is for<\/h4>\n\n<ul>\n<li>Wholesale and B2B stores that only show prices to trade customers<\/li>\n<li>Members only shops and private catalogs<\/li>\n<li>Manufacturers and distributors with dealer price lists<\/li>\n<li>Stores that want more registered customers<\/li>\n<li>Shops that show a catalog but take orders by phone, email or a form<\/li>\n<\/ul>\n\n<h4>Free vs Pro<\/h4>\n\n<p>The free plugin covers one audience and one set of protected products for your whole store. <a href=\"https:\/\/devdiggers.com\/product\/woocommerce-hide-price-for-guest\/\">Hide Price Pro<\/a> adds the tools for stores that need more than one rule, want to collect quote requests, or want to know which hidden prices turn into customers.<\/p>\n\n<h3>Rules engine (Pro)<\/h3>\n\n<ul>\n<li>As many rules as you need, run by priority, each with ALL or ANY matching<\/li>\n<li>Conditions on product, category, tag, product type, price, stock quantity, stock status, on sale, featured, virtual, downloadable, review count, average rating and published date<\/li>\n<li>A different audience, price text, button action, button text and link for every rule<\/li>\n<li>Start and end dates, for example to reveal prices at a product launch<\/li>\n<li>Duplicate, pause and reactivate rules in one click<\/li>\n<\/ul>\n\n<h3>Request a quote (Pro)<\/h3>\n\n<ul>\n<li>A Request a Quote button that opens a form on the product page<\/li>\n<li>Every request stored in a Quote Requests inbox with search, statuses and bulk actions<\/li>\n<li>Email alerts to your team and a copy to the customer, editable under WooCommerce &gt; Settings &gt; Emails<\/li>\n<li>Honeypot and rate limit spam protection<\/li>\n<\/ul>\n\n<h3>Country rules and conversion analytics (Pro)<\/h3>\n\n<ul>\n<li>Hide prices only in the countries you choose, or everywhere except them<\/li>\n<li>See the logins and signups that came from a hidden price, the click to login rate, and quote requests by status<\/li>\n<\/ul>\n\n<p>Every setting you make in the free plugin carries over when you upgrade.<\/p>\n\n<h4>A note from the founder<\/h4>\n\n<p>We build DevDiggers plugins for real WooCommerce stores, and we answer the support forum ourselves. If something does not work the way you expect, or you would like a feature, open a topic in the support forum. We read every one.<\/p>\n\n<h3>External services<\/h3>\n\n<p>The bundled DevDiggers framework, which draws the admin screens, connects to the services below. All of them run only inside the WordPress admin. The storefront makes no external requests.<\/p>\n\n<p><strong>1. DevDiggers extensions directory<\/strong><\/p>\n\n<ul>\n<li>What it is: A read only API on devdiggers.com that returns the public list of DevDiggers extensions.<\/li>\n<li>What it is used for: Showing available DevDiggers extensions on the Extensions admin page.<\/li>\n<li>When data is sent: Never by default. The Extensions admin page shows a \"Load extensions from devdiggers.com\" button, and the list is requested only after an administrator clicks it (opt-in). The response is cached for 24 hours.<\/li>\n<li>What data is sent: A standard outbound HTTP request only, meaning your server's IP address and a plugin user agent string. No personal data and no store data are sent. The page also loads each listed extension's image from devdiggers.com in the administrator's browser.<\/li>\n<li>Endpoint: https:\/\/devdiggers.com\/wp-json\/ddwcs\/v1\/plugins<\/li>\n<\/ul>\n\n<p><strong>2. Newsletter subscription (optional)<\/strong><\/p>\n\n<ul>\n<li>What it is: A contact and newsletter endpoint on devdiggers.com.<\/li>\n<li>What it is used for: Adding your email address to the DevDiggers newsletter, only if you choose to subscribe.<\/li>\n<li>When data is sent: Only when an administrator submits the optional newsletter form in the plugin dashboard. Nothing is sent automatically.<\/li>\n<li>What data is sent: The email address you enter and your site URL.<\/li>\n<li>Endpoint: https:\/\/devdiggers.com\/?fluentcrm=1&amp;route=contact<\/li>\n<\/ul>\n\n<p>The services above are provided by DevDiggers. By using them you agree to the DevDiggers Terms and Conditions (https:\/\/devdiggers.com\/terms-and-conditions\/) and Privacy Policy (https:\/\/devdiggers.com\/privacy-policy\/).<\/p>\n\n<p><strong>3. Gravatar (avatar images)<\/strong><\/p>\n\n<ul>\n<li>What it is: Gravatar, the avatar service operated by Automattic.<\/li>\n<li>What it is used for: WordPress core's <code>get_avatar_url()<\/code> shows the logged in administrator's avatar in the plugin dashboard header. This is standard WordPress behaviour.<\/li>\n<li>When data is sent: Only when a logged in administrator opens the plugin dashboard and avatars are enabled under Settings &gt; Discussion. Turning avatars off there stops the request.<\/li>\n<li>What data is sent: A hash of the administrator's email address inside the image URL, plus the usual request data such as IP address and user agent.<\/li>\n<li>Endpoint: https:\/\/secure.gravatar.com\/avatar\/<\/li>\n<li>Terms of Service: https:\/\/automattic.com\/terms\/<\/li>\n<li>Privacy Policy: https:\/\/automattic.com\/privacy\/<\/li>\n<\/ul>\n\n<p>This plugin contains no licence checks, no update checks and no telemetry.<\/p>\n\n<h3>Source code and build tools<\/h3>\n\n<p>The admin and storefront JavaScript and CSS in <code>assets\/<\/code> are compiled from the <code>src\/<\/code> folder with webpack and Babel. The complete, human readable source code, including all build configuration, is published in our public GitHub repository:<\/p>\n\n<p>https:\/\/github.com\/DevDiggers-Technologies\/hide-price-for-woocommerce<\/p>\n\n<p>To build the assets from source:<\/p>\n\n<ol>\n<li>Run <code>npm install<\/code> to install the build dependencies listed in <code>package.json<\/code>.<\/li>\n<li>Run <code>npm run build<\/code> to compile the production assets into <code>assets\/js<\/code> and <code>assets\/css<\/code>.<\/li>\n<\/ol>\n\n<p>Two third party libraries used by the admin screens ship unmodified under the MIT licence inside <code>devdiggers-framework\/assets\/js\/<\/code>: Chart.js (https:\/\/www.chartjs.org) and Select2 (https:\/\/select2.org).<\/p>\n\n<!--section=installation-->\n<h4>Automatic installation<\/h4>\n\n<ol>\n<li>In your WordPress admin, go to Plugins &gt; Add New.<\/li>\n<li>Search for \"DevDiggers Hide Price\".<\/li>\n<li>Click Install Now, then Activate.<\/li>\n<\/ol>\n\n<h4>Manual installation<\/h4>\n\n<ol>\n<li>Download the plugin zip file.<\/li>\n<li>Go to Plugins &gt; Add New &gt; Upload Plugin and choose the zip file.<\/li>\n<li>Click Install Now, then Activate.<\/li>\n<\/ol>\n\n<h4>After activating<\/h4>\n\n<ol>\n<li>The setup wizard opens. Choose who should not see prices, where to hide them and what visitors see instead.<\/li>\n<li>Fine tune exclusions and protection under DevDiggers Plugins &gt; Hide Price &gt; Configuration.<\/li>\n<li>Open your shop in a private browser window to see it as a guest.<\/li>\n<\/ol>\n\n<h4>Requirements<\/h4>\n\n<ul>\n<li>WordPress 6.5 or later<\/li>\n<li>WooCommerce 9.0 or later<\/li>\n<li>PHP 7.4 or later<\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20hide%20prices%20from%20guests%20in%20woocommerce%3F\"><h3>How do I hide prices from guests in WooCommerce?<\/h3><\/dt>\n<dd><p>Install the plugin and turn it on in the setup wizard. Guests is the default audience and All products the default scope, so every price is hidden from logged out visitors right away.<\/p><\/dd>\n<dt id=\"how%20do%20i%20show%20prices%20only%20to%20logged%20in%20customers%3F\"><h3>How do I show prices only to logged in customers?<\/h3><\/dt>\n<dd><p>Leave Hide Prices For set to Guests. Everyone who is logged in sees prices. To hide prices from some logged in customers too, add their user role.<\/p><\/dd>\n<dt id=\"can%20i%20hide%20prices%20for%20a%20wholesale%20or%20members%20only%20catalog%3F\"><h3>Can I hide prices for a wholesale or members only catalog?<\/h3><\/dt>\n<dd><p>Yes. Add the roles that should not see prices, for example Customer, and keep your wholesale role out of the list. Those users see the price message, everyone else sees prices.<\/p><\/dd>\n<dt id=\"can%20i%20hide%20only%20the%20add%20to%20cart%20button%20and%20keep%20the%20price%3F\"><h3>Can I hide only the Add to Cart button and keep the price?<\/h3><\/dt>\n<dd><p>Yes. Under Configuration &gt; General, set What to Hide to \"Add to cart button only\".<\/p><\/dd>\n<dt id=\"can%20i%20hide%20prices%20on%20some%20products%20only%3F\"><h3>Can I hide prices on some products only?<\/h3><\/dt>\n<dd><p>Yes. Set Hide Prices On to \"Selected products and categories\" and pick them. You can also set any product to always hide or always show its price from its edit screen.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20variable%20products%3F\"><h3>Does it work with variable products?<\/h3><\/dt>\n<dd><p>Yes. Hide a whole variable product, or pick single variations. When only some variations are hidden, the price range shown for the product is rebuilt from the visible ones.<\/p><\/dd>\n<dt id=\"can%20visitors%20still%20buy%20a%20protected%20product%20through%20a%20direct%20link%3F\"><h3>Can visitors still buy a protected product through a direct link?<\/h3><\/dt>\n<dd><p>No, as long as Block Purchases is on (it is by default). The product is marked as not purchasable on the server, so ?add-to-cart= links and the Cart block refuse it.<\/p><\/dd>\n<dt id=\"will%20google%20still%20show%20my%20hidden%20prices%3F\"><h3>Will Google still show my hidden prices?<\/h3><\/dt>\n<dd><p>Not from your product pages. The price is removed from the schema markup. Search results already indexed may take a while to refresh.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20the%20woocommerce%20blocks%3F\"><h3>Does it work with the WooCommerce blocks?<\/h3><\/dt>\n<dd><p>Yes. Prices are removed from the Store API responses that the product blocks use, and protected products cannot be added to the Cart block.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20block%20themes%3F\"><h3>Does it work with block themes?<\/h3><\/dt>\n<dd><p>Yes. In block themes such as Twenty Twenty-Five, the Add to Cart form block is replaced by your button on protected products, just like the classic product page.<\/p><\/dd>\n<dt id=\"can%20shop%20managers%20change%20the%20settings%3F\"><h3>Can shop managers change the settings?<\/h3><\/dt>\n<dd><p>Yes. Anyone who can manage WooCommerce can open and save the plugin settings, so a Shop Manager does not need administrator access.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20page%20caching%3F\"><h3>Does it work with page caching?<\/h3><\/dt>\n<dd><p>Logged in visitors usually bypass the page cache, so they always see the right prices. If your cache serves pages to logged in users, exclude product and shop pages for them.<\/p><\/dd>\n<dt id=\"what%20does%20the%20dashboard%20count%3F\"><h3>What does the dashboard count?<\/h3><\/dt>\n<dd><p>Clicks on the button that replaces Add to Cart, per day and per product, plus how many products are protected. You can turn the click counter off under Configuration &gt; General.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20collect%20personal%20data%3F\"><h3>Does the plugin collect personal data?<\/h3><\/dt>\n<dd><p>No. The click counter stores a daily total and a total per product in your own database. It does not store IP addresses, user IDs or cookies.<\/p><\/dd>\n<dt id=\"will%20my%20settings%20be%20kept%20if%20i%20upgrade%20to%20pro%3F\"><h3>Will my settings be kept if I upgrade to Pro?<\/h3><\/dt>\n<dd><p>Yes. Pro uses the same settings, and turns your protected products into its first rule automatically.<\/p><\/dd>\n<dt id=\"can%20i%20translate%20the%20plugin%3F\"><h3>Can I translate the plugin?<\/h3><\/dt>\n<dd><p>Yes. It is translation ready, and the price text, button text and custom URL can be translated with WPML.<\/p><\/dd>\n<dt id=\"where%20can%20i%20get%20help%3F\"><h3>Where can I get help?<\/h3><\/dt>\n<dd><p>Open a topic in the <a href=\"https:\/\/wordpress.org\/support\/plugin\/devdiggers-hide-price-for-woocommerce\/\">support forum<\/a> or read the <a href=\"https:\/\/docs.devdiggers.com\/woocommerce-hide-price-for-guest\/\">documentation<\/a>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial free release.<\/li>\n<li>Hide prices and the Add to Cart button from guests, any user role, or both.<\/li>\n<li>Hide the price and Add to Cart together, or only the Add to Cart button and keep prices public.<\/li>\n<li>Protect all products, or only selected products, variations and categories, with product and category exclusions.<\/li>\n<li>Price visibility setting on every product: always hide, always show, or follow the plugin settings.<\/li>\n<li>Your own message in place of the price, with HTML, {login_url}, {register_url} and {product_name} placeholders and badge colours.<\/li>\n<li>Replacement button: a login popup that returns the visitor to the same product, a link to your own page, or no button.<\/li>\n<li>Leak proof hiding: protected products cannot be bought through direct links or the Cart block, and prices are removed from schema markup, the Store API and the Filter by Price block.<\/li>\n<li>Works with classic and block themes, variable and grouped products, and quick view plugins.<\/li>\n<li>Dashboard with protected products, button clicks and a setup checklist, plus a four step setup wizard.<\/li>\n<li>Shop Managers can open and save the settings.<\/li>\n<li>Translation ready, with WPML support for the price text, button text and custom URL.<\/li>\n<\/ul>","raw_excerpt":"Hide WooCommerce prices and Add to Cart from guests or any user role. Show a login popup or your own link instead, and keep prices out of Google.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/393224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=393224"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/devdiggers"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=393224"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=393224"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=393224"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=393224"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=393224"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=393224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}