{"id":396199,"date":"2026-11-02T09:46:01","date_gmt":"2026-11-02T09:46:01","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/buy-now-pay-later-for-woocommerce\/"},"modified":"2026-11-02T09:45:39","modified_gmt":"2026-11-02T09:45:39","slug":"devdiggers-buy-now-pay-later-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/devdiggers-buy-now-pay-later-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 Buy Now Pay Later for WooCommerce","header_author":"DevDiggers","header_description":"Run your own buy now, pay later program. Offer Pay in 4 and pay in 30 days on a store credit line you control, show installment pricing on product pages, approve customers and collect every payment with automatic reminders.","assets_banners_color":"fefefe","last_updated":"2026-11-02 09:45:39","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/devdiggers.com\/product\/woocommerce-buy-now-pay-later\/","header_author_uri":"https:\/\/devdiggers.com\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":138,"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-11-02 09:45:39","revision":3779459}},"upgrade_notice":{"1.0.0":"<p>First release of Buy Now Pay Later for WooCommerce.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.gif":{"filename":"icon-128x128.gif","revision":3779458,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.gif":{"filename":"icon-256x256.gif","revision":3779458,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500-rtl.png":{"filename":"banner-1544x500-rtl.png","revision":3779458,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3779458,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250-rtl.png":{"filename":"banner-772x250-rtl.png","revision":3779458,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3779458,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3779459,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"meta\":{\"title\":\"DevDiggers Buy Now Pay Later for WooCommerce demo\",\"description\":\"A furniture and audio store where approved customers buy with Pay in 4 or Pay in 30 days on store credit.\",\"author\":\"devdiggers\",\"categories\":[\"WooCommerce\"]},\"landingPage\":\"\\\/wp-admin\\\/admin.php?page=ddwcpp-dashboard&date_range=90_days\",\"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-buy-now-pay-later-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-buy-now-pay-later-for-woocommerce\":true,\"_ddwcpp_enabled\":\"yes\"}},{\"step\":\"runPHP\",\"code\":\"<?php\\nrequire '\\\/wordpress\\\/wp-load.php';\\nrequire_once ABSPATH . 'wp-admin\\\/includes\\\/image.php';\\nglobal $wpdb;\\n\\n\\\/\\\/ Seed quietly: Pay Later rows are written straight to the plugin's tables, so no emails go out.\\nadd_filter( 'pre_wp_mail', '__return_false' );\\ndelete_transient( '_wc_activation_redirect' );\\ndelete_transient( 'ddfw_activation_redirect_devdiggers-buy-now-pay-later-for-woocommerce' );\\nupdate_option( 'ddfw_setup_wizard_completed_devdiggers-buy-now-pay-later-for-woocommerce', true );\\n\\n\\\/\\\/ Real faces for everyone in the demo (portraits load in the visitor's browser).\\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'sofia.romero@example.com'   => 'https:\\\/\\\/randomuser.me\\\/api\\\/portraits\\\/women\\\/65.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\\t'noah.mueller@example.com'   => 'https:\\\/\\\/randomuser.me\\\/api\\\/portraits\\\/men\\\/46.jpg',\\n\\t'chloe.dubois@example.com'   => 'https:\\\/\\\/randomuser.me\\\/api\\\/portraits\\\/women\\\/24.jpg',\\n\\t'marcus.bell@example.com'    => 'https:\\\/\\\/randomuser.me\\\/api\\\/portraits\\\/men\\\/86.jpg',\\n\\t'aisha.rahman@example.com'   => 'https:\\\/\\\/randomuser.me\\\/api\\\/portraits\\\/women\\\/12.jpg',\\n\\t'diego.santos@example.com'   => 'https:\\\/\\\/randomuser.me\\\/api\\\/portraits\\\/men\\\/22.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 );\\\\nadd_filter( 'woocommerce_customer_email_verification_should_show_prompt', '__return_false' );\\\\n\\\"\\n);\\n\\n\\\/\\\/ Store details.\\nupdate_option( 'blogname', 'Fernhill Home' );\\nupdate_option( 'blogdescription', 'Furniture and audio, paid your way' );\\nupdate_option( 'woocommerce_currency', 'USD' );\\nupdate_option( 'woocommerce_store_address', '240 Larch Avenue' );\\nupdate_option( 'woocommerce_store_city', 'Portland' );\\nupdate_option( 'woocommerce_default_country', 'US:OR' );\\nupdate_option( 'woocommerce_store_postcode', '97209' );\\nwp_update_user( [ 'ID' => 1, 'display_name' => 'Hannah Lowe', 'first_name' => 'Hannah', 'last_name' => 'Lowe', 'user_email' => 'admin@localhost.com' ] );\\n\\n\\\/\\\/ Pay Later configuration (free settings only).\\n$limit = 1500;\\nupdate_option( '_ddwcpp_enabled', 'yes' );\\nupdate_option( '_ddwcpp_limit', (string) $limit );\\nupdate_option( '_ddwcpp_verification_mode', 'manual' );\\nupdate_option( '_ddwcpp_auto_activate', 'yes' );\\nupdate_option( '_ddwcpp_reminder_days', '3' );\\nupdate_option( '_ddwcpp_message_enabled', 'yes' );\\nupdate_option( '_ddwcpp_message_locations', [ 'product', 'shop', 'cart' ] );\\nupdate_option( '_ddwcpp_block_overdue', 'yes' );\\nupdate_option( '_ddwcpp_show_credit_at_checkout', 'yes' );\\nupdate_option( '_ddwcpp_my_account_endpoint', 'pay-later' );\\nupdate_option( '_ddwcpp_plans', [ 'pay-in-4' => [ 'status' => 'active' ], 'pay-in-30' => [ 'status' => 'active' ] ] );\\nadd_rewrite_endpoint( 'pay-later', EP_ROOT | EP_PAGES );\\nupdate_option( 'woocommerce_ddwcpp_postpaid_settings', [ 'enabled' => 'yes', 'title' => 'Pay Later with Fernhill', 'description' => 'Choose a plan and pay over time from your account. No card needed today.' ] );\\nupdate_option( 'woocommerce_cod_settings', [ 'enabled' => 'yes', 'title' => 'Cash on delivery' ] );\\nupdate_option( 'woocommerce_bacs_settings', [ 'enabled' => 'yes', 'title' => 'Direct bank transfer' ] );\\n\\n\\\/\\\/ Products with real photos that ship inside WooCommerce.\\n$img_dir = WP_PLUGIN_DIR . '\\\/woocommerce\\\/assets\\\/images\\\/pattern-placeholders\\\/';\\n$catalog = [\\n\\t'chair'   => [ 'Window Reading Chair', 420, 'table-wood-house-chair-floor-window.jpg', 'Ash frame with a woven paper cord seat. Sits low and deep, made for long afternoons.', 'Furniture' ],\\n\\t'player'  => [ 'Walnut Record Player', 349, 'music-needle-turntable-black-and-white-white-photography.jpg', 'Belt drive turntable in a solid walnut plinth with a built in preamp.', 'Audio' ],\\n\\t'watch'   => [ 'Platinum Mesh Watch', 240, 'watch-hand-brand-jewellery-strap-platinum.jpg', 'Minimal dial on a brushed platinum mesh strap.', 'Accessories' ],\\n\\t'stool'   => [ 'Oak Bistro Stool', 185, 'Image-table-wood-chair-stool-interior-restaurant.jpg', 'Solid white oak with a hand rubbed oil finish.', 'Furniture' ],\\n\\t'lamp'    => [ 'Ivory Pattern Table Lamp', 129, 'white-vase-decoration-pattern-ceramic-lamp.jpg', 'Hand carved ceramic base with a linen shade.', 'Lighting' ],\\n\\t'carafe'  => [ 'Blown Glass Carafe Set', 64, 'drinkware-liquid-tableware-dishware-bottle-fluid.jpg', 'A one litre carafe with two matching tumblers.', 'Kitchen' ],\\n\\t'vase'    => [ 'Sage Ceramic Vase', 48, 'sun-glass-vase-green-ceramic-shelf.jpg', 'Wheel thrown stoneware vase in a soft sage glaze.', 'Decor' ],\\n\\t'jars'    => [ 'Green Glass Pantry Jars', 42, 'green-glass-jars-on-stairs.jpg', 'Set of three recycled glass jars with cork lids.', 'Kitchen' ],\\n];\\n$products = [];\\nforeach ( $catalog as $key => $p ) {\\n\\t$upload = wp_upload_bits( $p[2], null, file_get_contents( $img_dir . $p[2] ) );\\n\\t$att_id = wp_insert_attachment( [ 'post_mime_type' => 'image\\\/jpeg', 'post_title' => $p[0], 'post_status' => 'inherit' ], $upload['file'] );\\n\\twp_update_attachment_metadata( $att_id, wp_generate_attachment_metadata( $att_id, $upload['file'] ) );\\n\\t$cat  = term_exists( $p[4], 'product_cat' ) ?: wp_insert_term( $p[4], 'product_cat' );\\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[3] );\\n\\t$prod->set_description( $p[3] );\\n\\t$prod->set_image_id( $att_id );\\n\\t$prod->set_category_ids( [ (int) $cat['term_id'] ] );\\n\\t$prod->set_status( 'publish' );\\n\\t$products[ $key ] = $prod->save();\\n}\\n$dues_product = wc_get_product( (int) get_option( '_ddwcpp_dues_product_id' ) ) ?: wc_get_product( DDWCPP_Install::ddwcpp_create_product() );\\n\\n$people = [\\n\\t'amara'  => [ 'Amara', 'Okafor', 'amara.okafor@example.com', '12 Harbour Street', 'Seattle', 'WA', '98101' ],\\n\\t'liam'   => [ 'Liam', 'Carter', 'liam.carter@example.com', '77 Maple Avenue', 'Denver', 'CO', '80203' ],\\n\\t'sofia'  => [ 'Sofia', 'Romero', 'sofia.romero@example.com', '9 Bayview Road', 'San Diego', 'CA', '92101' ],\\n\\t'kenji'  => [ 'Kenji', 'Watanabe', 'kenji.watanabe@example.com', '230 Pine Street', 'San Francisco', 'CA', '94104' ],\\n\\t'priya'  => [ 'Priya', 'Sharma', 'priya.sharma@example.com', '58 Elm Court', 'Austin', 'TX', '78701' ],\\n\\t'noah'   => [ 'Noah', 'Mueller', 'noah.mueller@example.com', '4 Riverside Drive', 'Chicago', 'IL', '60601' ],\\n\\t'diego'  => [ 'Diego', 'Santos', 'diego.santos@example.com', '15 Mission Lane', 'Phoenix', 'AZ', '85004' ],\\n\\t'chloe'  => [ 'Chloe', 'Dubois', 'chloe.dubois@example.com', '19 Beacon Street', 'Boston', 'MA', '02108' ],\\n\\t'marcus' => [ 'Marcus', 'Bell', 'marcus.bell@example.com', '301 Ocean Boulevard', 'Miami', 'FL', '33139' ],\\n\\t'aisha'  => [ 'Aisha', 'Rahman', 'aisha.rahman@example.com', '640 Lake Shore Way', 'Minneapolis', 'MN', '55401' ],\\n];\\n$plans = \\\\DDWCPostPaid\\\\Helper\\\\Plans\\\\DDWCPP_Plans_Helper::ddwcpp_get_plans();\\n$now   = current_time( 'timestamp' ); \\\/\\\/ Site time, like every date the plugin stores.\\n$t_tx  = $wpdb->prefix . 'ddwcpp_transactions';\\n$t_in  = $wpdb->prefix . 'ddwcpp_installments';\\n$debt  = [];\\n$log   = []; \\\/\\\/ Written in date order at the end, so IDs and \\\"Recent Transactions\\\" follow time.\\n$tx    = function ( $uid, $type, $amount, $ref, $note, $ts, $order_id = null ) use ( &$log, &$debt ) {\\n\\t$log[] = [ 'order_id' => $order_id, 'reference' => $ref, 'user_id' => $uid, 'amount' => wc_format_decimal( $amount, 2 ), 'type' => $type, 'date' => gmdate( 'Y-m-d H:i:s', $ts ), 'note' => $note ];\\n\\t$debt[ $uid ] = round( ( $debt[ $uid ] ?? 0 ) + ( 'debit' === $type ? $amount : -$amount ), 2 );\\n};\\n$new_order = function ( $who, $uid, $ts ) use ( $people ) {\\n\\t$p     = $people[ $who ];\\n\\t$addr  = [ 'first_name' => $p[0], 'last_name' => $p[1], 'email' => $p[2], 'address_1' => $p[3], 'city' => $p[4], 'state' => $p[5], 'postcode' => $p[6], 'country' => 'US' ];\\n\\t$order = wc_create_order( [ 'customer_id' => $uid ] );\\n\\t$order->set_address( $addr, 'billing' );\\n\\t$order->set_address( $addr, 'shipping' );\\n\\t$order->set_date_created( $ts - (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) );\\n\\treturn $order;\\n};\\n\\n\\\/\\\/ A Pay Later purchase: the order, its debit and the schedule. Installments already due were repaid on time,\\n\\\/\\\/ except on a $late purchase, where only the payment taken at checkout came in.\\n$buy = function ( $who, $uid, $keys, $plan_id, $days_ago, $late = false ) use ( $plans, $products, $now, $new_order, $tx, $wpdb, $t_in, $dues_product ) {\\n\\t$plan  = $plans[ $plan_id ];\\n\\t$ts    = $now - $days_ago * DAY_IN_SECONDS - wp_rand( 2, 9 ) * HOUR_IN_SECONDS;\\n\\t$order = $new_order( $who, $uid, $ts );\\n\\tforeach ( $keys as $key ) {\\n\\t\\t$order->add_product( wc_get_product( $products[ $key ] ), 1 );\\n\\t}\\n\\t$order->set_payment_method( 'ddwcpp_postpaid' );\\n\\t$order->set_payment_method_title( 'Pay Later with Fernhill' );\\n\\t$order->calculate_totals();\\n\\t$total    = (float) $order->get_total();\\n\\t$schedule = \\\\DDWCPostPaid\\\\Helper\\\\Plans\\\\DDWCPP_Plans_Helper::ddwcpp_build_schedule( $plan, $total, $ts );\\n\\t$order->update_meta_data( '_ddwcpp_debited_amount', wc_format_decimal( $total ) );\\n\\t$order->update_meta_data( '_ddwcpp_plan_id', $plan['id'] );\\n\\t$order->update_meta_data( '_ddwcpp_plan_title', $plan['title'] );\\n\\t$order->set_status( $days_ago > 6 ? 'completed' : 'processing' );\\n\\t$order->save();\\n\\t$order->add_order_note( 'Paid with Pay Later: ' . $plan['title'] . '.' );\\n\\t$tx( $uid, 'debit', $total, 'order_debit', 'Order paid with Pay Later, ' . $plan['title'] . '.', $ts, $order->get_id() );\\n\\n\\tforeach ( $schedule as $i => $row ) {\\n\\t\\t$due_ts   = strtotime( $row['due_date'] );\\n\\t\\t$is_paid  = $due_ts <= $now && ( ! $late || ( 0 === $i && ! empty( $plan['upfront'] ) ) );\\n\\t\\t$pay_ts   = min( ( 0 === $i && ! empty( $plan['upfront'] ) ) ? $ts + 900 : $due_ts - wp_rand( 0, 2 ) * DAY_IN_SECONDS - wp_rand( 8, 14 ) * HOUR_IN_SECONDS, $now - 3600 );\\n\\t\\t$pay_id   = 0;\\n\\t\\tif ( $is_paid ) {\\n\\t\\t\\t$pay = $new_order( $who, $uid, $pay_ts );\\n\\t\\t\\t$item = $pay->get_item( $pay->add_product( $dues_product, 1, [ 'subtotal' => $row['amount'], 'total' => $row['amount'] ] ) );\\n\\t\\t\\t$item->update_meta_data( '_ddwcpp_dues_amount', wc_format_decimal( $row['amount'] ) );\\n\\t\\t\\t$item->save();\\n\\t\\t\\t\\\/\\\/ Already credited below, so the plugin's own \\\"dues order paid\\\" handler must skip it.\\n\\t\\t\\t$pay->update_meta_data( '_ddwcpp_order_completion_handled', 'yes' );\\n\\t\\t\\t$pay->set_payment_method( 'bacs' );\\n\\t\\t\\t$pay->set_payment_method_title( 'Direct bank transfer' );\\n\\t\\t\\t$pay->calculate_totals( false );\\n\\t\\t\\t$pay->set_status( 'completed' );\\n\\t\\t\\t$pay->save();\\n\\t\\t\\t$pay_id = $pay->get_id();\\n\\t\\t\\t$tx( $uid, 'credit', $row['amount'], 'cleared_dues', 'Pay Later dues repayment.', $pay_ts, $pay_id );\\n\\t\\t}\\n\\t\\t$wpdb->insert( $t_in, [\\n\\t\\t\\t'user_id'          => $uid,\\n\\t\\t\\t'order_id'         => $order->get_id(),\\n\\t\\t\\t'plan_id'          => $plan['id'],\\n\\t\\t\\t'plan_title'       => $plan['title'],\\n\\t\\t\\t'sequence'         => $i + 1,\\n\\t\\t\\t'total_count'      => count( $schedule ),\\n\\t\\t\\t'amount'           => wc_format_decimal( $row['amount'], 2 ),\\n\\t\\t\\t'paid_amount'      => $is_paid ? wc_format_decimal( $row['amount'], 2 ) : 0,\\n\\t\\t\\t'due_date'         => $row['due_date'],\\n\\t\\t\\t'status'           => $is_paid ? 'paid' : 'pending',\\n\\t\\t\\t'paid_date'        => $is_paid ? gmdate( 'Y-m-d H:i:s', $pay_ts ) : null,\\n\\t\\t\\t'payment_order_id' => $pay_id,\\n\\t\\t\\t'reminder_sent'    => ( ! $is_paid && $due_ts - $now < 3 * DAY_IN_SECONDS ) ? 1 : 0,\\n\\t\\t\\t'overdue_notified' => ( ! $is_paid && $due_ts < $now ) ? 1 : 0,\\n\\t\\t\\t'created'          => gmdate( 'Y-m-d H:i:s', $ts ),\\n\\t\\t] );\\n\\t}\\n\\treturn $order;\\n};\\n\\n\\\/\\\/ [ verification status, applied days ago, purchases [ products, plan, days ago, late ] ]. Spread over 85 days so\\n\\\/\\\/ the \\\"Last 3 Months\\\" dashboard has a shape whatever day a visitor opens it.\\n$story = [\\n\\t'amara'  => [ 'eligible', 88, [ [ [ 'chair', 'lamp' ], 'pay-in-4', 80 ], [ [ 'vase', 'jars' ], 'pay-in-30', 62 ], [ [ 'watch' ], 'pay-in-4', 30 ], [ [ 'player' ], 'pay-in-30', 9 ] ] ],\\n\\t'liam'   => [ 'eligible', 74, [ [ [ 'chair' ], 'pay-in-4', 70 ], [ [ 'stool' ], 'pay-in-4', 22 ], [ [ 'carafe', 'vase' ], 'pay-in-30', 3 ] ] ],\\n\\t'sofia'  => [ 'eligible', 79, [ [ [ 'lamp' ], 'pay-in-4', 75 ], [ [ 'watch', 'lamp' ], 'pay-in-30', 38, true ] ] ],\\n\\t'kenji'  => [ 'eligible', 52, [ [ [ 'jars' ], 'pay-in-30', 50 ], [ [ 'player', 'stool' ], 'pay-in-4', 5 ] ] ],\\n\\t'priya'  => [ 'eligible', 86, [ [ [ 'stool' ], 'pay-in-30', 84 ], [ [ 'carafe' ], 'pay-in-4', 55 ], [ [ 'chair', 'player' ], 'pay-in-4', 17 ] ] ],\\n\\t'noah'   => [ 'eligible', 68, [ [ [ 'lamp', 'vase' ], 'pay-in-30', 66 ], [ [ 'watch' ], 'pay-in-4', 12 ] ] ],\\n\\t'diego'  => [ 'eligible', 36, [ [ [ 'watch' ], 'pay-in-30', 33, true ], [ [ 'stool', 'carafe' ], 'pay-in-4', 1 ] ] ],\\n\\t'aisha'  => [ 'eligible', 47, [ [ [ 'player' ], 'pay-in-4', 45 ] ] ],\\n\\t'chloe'  => [ 'pending', 2, [] ],\\n\\t'marcus' => [ 'pending', 1, [] ],\\n];\\nforeach ( $story as $who => $s ) {\\n\\t$p   = $people[ $who ];\\n\\t$uid = wp_insert_user( [ 'user_login' => $who, 'user_pass' => 'password', 'user_email' => $p[2], 'first_name' => $p[0], 'last_name' => $p[1], 'display_name' => $p[0] . ' ' . $p[1], 'role' => 'customer' ] );\\n\\t$applied = $now - $s[1] * DAY_IN_SECONDS;\\n\\t$wpdb->update( $wpdb->users, [ 'user_registered' => gmdate( 'Y-m-d H:i:s', $applied - 5 * DAY_IN_SECONDS ) ], [ 'ID' => $uid ] );\\n\\tforeach ( [ 'billing', 'shipping' ] as $type ) {\\n\\t\\tforeach ( [ 'first_name' => $p[0], 'last_name' => $p[1], 'address_1' => $p[3], 'city' => $p[4], 'state' => $p[5], 'postcode' => $p[6], 'country' => 'US' ] as $k => $v ) {\\n\\t\\t\\tupdate_user_meta( $uid, $type . '_' . $k, $v );\\n\\t\\t}\\n\\t}\\n\\tupdate_user_meta( $uid, 'billing_email', $p[2] );\\n\\tupdate_user_meta( $uid, '_ddwcpp_verification_status', $s[0] );\\n\\tupdate_user_meta( $uid, '_ddwcpp_applied_on', gmdate( 'Y-m-d H:i:s', $applied ) );\\n\\tif ( 'eligible' !== $s[0] ) {\\n\\t\\tcontinue;\\n\\t}\\n\\tupdate_user_meta( $uid, '_ddwcpp_postpaid_limit', wc_format_decimal( $limit ) );\\n\\tupdate_user_meta( $uid, '_ddwcpp_postpaid_allotted', 'yes' );\\n\\t$debt[ $uid ] = 0;\\n\\tusort( $s[2], function ( $a, $b ) { return $b[2] <=> $a[2]; } );\\n\\tforeach ( $s[2] as $b ) {\\n\\t\\t$buy( $who, $uid, $b[0], $b[1], $b[2], ! empty( $b[3] ) );\\n\\t}\\n}\\n$sofia = get_user_by( 'login', 'sofia' )->ID;\\n$tx( $sofia, 'credit', 60, 'manual_payment', 'Part payment received by phone.', $now - 4 * DAY_IN_SECONDS );\\n$wpdb->query( $wpdb->prepare( \\\"UPDATE {$t_in} SET paid_amount = 60 WHERE user_id = %d AND status = 'pending'\\\", $sofia ) );\\n\\nusort( $log, function ( $a, $b ) { return strcmp( $a['date'], $b['date'] ); } );\\nforeach ( $log as $row ) {\\n\\t$wpdb->insert( $t_tx, $row, [ '%d', '%s', '%d', '%s', '%s', '%s', '%s' ] );\\n}\\n\\n\\\/\\\/ Balances and due dates exactly as the plugin keeps them.\\nforeach ( $debt as $uid => $owed ) {\\n\\tupdate_user_meta( $uid, '_ddwcpp_postpaid_balance', wc_format_decimal( $limit - $owed, 2 ) );\\n\\t$due = $wpdb->get_var( $wpdb->prepare( \\\"SELECT MIN(due_date) FROM {$t_in} WHERE user_id = %d AND status = 'pending'\\\", $uid ) );\\n\\t$due ? update_user_meta( $uid, '_ddwcpp_due_date', $due ) : delete_user_meta( $uid, '_ddwcpp_due_date' );\\n}\\nforeach ( [ 'ddwcpp_dashboard_data', 'ddwcpp_flush_rewrite_rules' ] as $t ) {\\n\\tdelete_transient( $t );\\n}\\n\\n\\\/\\\/ ---- Storefront (Kadence + DevDiggers demo kit) ----\\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' => '#1f6f54', 'css' => '.ddwcpp-message{color:#424245}.ddwcpp-message-more{color:#1f6f54}' ] );\\n\\n$shop    = wc_get_page_permalink( 'shop' );\\n$account = wc_get_page_permalink( 'myaccount' );\\n$later   = wc_get_endpoint_url( 'pay-later', '', $account );\\n$home_id = ddwc_demo_kit_home( [\\n\\t'eyebrow'        => 'Buy now, pay later',\\n\\t'title'          => 'Take it home today. Pay over time.',\\n\\t'lead'           => 'Furniture and audio from small workshops. Approved customers split any order into four payments or pay the full amount in 30 days, with no interest and no fees.',\\n\\t'ctas'           => [ [ 'Shop the collection', $shop ], [ 'See my Pay Later', $later ] ],\\n\\t'hero_img'       => [ ddwc_demo_kit_img( $products['chair'] ), ddwc_demo_kit_img( $products['player'] ), ddwc_demo_kit_img( $products['lamp'] ) ],\\n\\t'hero_alt'       => 'Fernhill Home furniture and audio',\\n\\t'widget'         => '<div class=\\\"dk-widget\\\"><div class=\\\"dk-w-head\\\"><span class=\\\"dk-w-app\\\">' . ddwc_demo_kit_icon( 'wallet' ) . '<\\\/span><span><span class=\\\"dk-w-label\\\">Pay in 4<\\\/span><span class=\\\"dk-w-title\\\">Window Reading Chair<\\\/span><\\\/span><\\\/div>'\\n\\t\\t. '<span class=\\\"dk-w-big\\\">$105.00<\\\/span><span class=\\\"dk-w-pill\\\">every 2 weeks, no interest<\\\/span>'\\n\\t\\t. '<div class=\\\"dk-w-row\\\"><span>Today<\\\/span><span>$105.00<\\\/span><\\\/div><div class=\\\"dk-w-row\\\"><span>In 2, 4 and 6 weeks<\\\/span><span>3 &times; $105.00<\\\/span><\\\/div><div class=\\\"dk-w-row is-total\\\"><span>Total<\\\/span><span>$420.00<\\\/span><\\\/div><\\\/div>',\\n\\t'features_title' => 'Credit you can count on.',\\n\\t'features'       => [\\n\\t\\t[ 'Pay in 4', 'Four equal payments, one every two weeks. The first is due when you order.', 'card' ],\\n\\t\\t[ 'Pay in 30 days', 'Get it now and pay the full amount within 30 days. Ideal for trade and repeat buyers.', 'clock' ],\\n\\t\\t[ 'Reminders before every due date', 'We email you a few days before each payment, with a link to pay in one click.', 'bell' ],\\n\\t],\\n\\t'shelf_title'    => 'New in the workshop.',\\n\\t'shelf_sub'      => 'See the installment price under every product.',\\n\\t'shelf'          => '[products limit=\\\"8\\\" columns=\\\"4\\\" orderby=\\\"price\\\" order=\\\"DESC\\\"]',\\n\\t'tile'           => [\\n\\t\\t'title' => 'Everything you owe, in one place.',\\n\\t\\t'text'  => 'See your available credit, the next payment and every plan from My Account, then pay with card or bank transfer.',\\n\\t\\t'cta'   => [ 'Open Pay Later', $later ],\\n\\t\\t'img'   => ddwc_demo_kit_img( $products['stool'] ),\\n\\t\\t'alt'   => 'Oak bistro stool',\\n\\t],\\n] );\\nddwc_demo_kit_menu( [ 'Shop' => $shop, 'Pay Later' => $later, 'My account' => $account ] );\\n\\nddwc_demo_kit_switcher( <<<'DDWCVIEWS'\\n$account = wc_get_page_permalink( 'myaccount' );\\n\\treturn [\\n\\t\\t[ 'label' => 'Pay Later dashboard', 'hint' => 'Dues, repayments and overdue', 'icon' => 'admin', 'user' => 'admin', 'url' => admin_url( 'admin.php?page=ddwcpp-dashboard&date_range=90_days' ) ],\\n\\t\\t[ 'label' => 'Customer account', 'hint' => 'Amara sees credit and payments', 'icon' => 'wallet', 'user' => 'amara', 'url' => wc_get_endpoint_url( 'pay-later', '', $account ) ],\\n\\t\\t[ 'label' => 'Product page', 'hint' => 'Installment price under the price', 'icon' => 'store', 'user' => '', 'url' => get_permalink( get_page_by_path( 'window-reading-chair', OBJECT, 'product' ) ) ],\\n\\t\\t[ 'label' => 'Storefront', 'hint' => 'The shop your customers see', 'icon' => 'store', 'user' => '', 'url' => home_url( '\\\/' ) ],\\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":3779458,"resolution":"1","location":"assets","locale":"","width":1848,"height":1062},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3779458,"resolution":"2","location":"assets","locale":"","width":1848,"height":1062},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3779458,"resolution":"3","location":"assets","locale":"","width":1848,"height":1062},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3779458,"resolution":"4","location":"assets","locale":"","width":1848,"height":1062},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3779458,"resolution":"5","location":"assets","locale":"","width":1848,"height":1062},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3779458,"resolution":"6","location":"assets","locale":"","width":1848,"height":1062},"screenshot-7.png":{"filename":"screenshot-7.png","revision":3779458,"resolution":"7","location":"assets","locale":"","width":1848,"height":1062},"screenshot-8.png":{"filename":"screenshot-8.png","revision":3779458,"resolution":"8","location":"assets","locale":"","width":1848,"height":1062}},"screenshots":{"1":"Dashboard with outstanding dues, credit used, repayment rate and upcoming payments.","2":"Pay in 4 and Pay in 30 days plan choice at checkout, with available credit.","3":"Installment price under the product price, with the Learn more link.","4":"The Pay Later section in My Account with the next payment and Pay now button.","5":"Customers screen with approval status, dues and the Adjust Balance dialog.","6":"Installments screen with upcoming, due soon and overdue views and Mark paid.","7":"Credit and approval settings.","8":"Payment plan switches under Configuration &gt; General."}},"plugin_section":[],"plugin_tags":[193715,148099,51755,193682,290239],"plugin_category":[],"plugin_contributors":[220149],"plugin_business_model":[],"class_list":["post-396199","plugin","type-plugin","status-publish","hentry","plugin_tags-bnpl","plugin_tags-buy-now-pay-later","plugin_tags-installments","plugin_tags-net-30","plugin_tags-pay-in-4","plugin_contributors-devdiggers","plugin_committers-devdiggers"],"banners":{"banner":"https:\/\/ps.w.org\/devdiggers-buy-now-pay-later-for-woocommerce\/assets\/banner-772x250.png?rev=3779458","banner_2x":"https:\/\/ps.w.org\/devdiggers-buy-now-pay-later-for-woocommerce\/assets\/banner-1544x500.png?rev=3779458","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/devdiggers-buy-now-pay-later-for-woocommerce\/assets\/icon-128x128.gif?rev=3779458","icon_2x":"https:\/\/ps.w.org\/devdiggers-buy-now-pay-later-for-woocommerce\/assets\/icon-256x256.gif?rev=3779458","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/devdiggers-buy-now-pay-later-for-woocommerce\/assets\/screenshot-1.png?rev=3779458","caption":"Dashboard with outstanding dues, credit used, repayment rate and upcoming payments."},{"src":"https:\/\/ps.w.org\/devdiggers-buy-now-pay-later-for-woocommerce\/assets\/screenshot-2.png?rev=3779458","caption":"Pay in 4 and Pay in 30 days plan choice at checkout, with available credit."},{"src":"https:\/\/ps.w.org\/devdiggers-buy-now-pay-later-for-woocommerce\/assets\/screenshot-3.png?rev=3779458","caption":"Installment price under the product price, with the Learn more link."},{"src":"https:\/\/ps.w.org\/devdiggers-buy-now-pay-later-for-woocommerce\/assets\/screenshot-4.png?rev=3779458","caption":"The Pay Later section in My Account with the next payment and Pay now button."},{"src":"https:\/\/ps.w.org\/devdiggers-buy-now-pay-later-for-woocommerce\/assets\/screenshot-5.png?rev=3779458","caption":"Customers screen with approval status, dues and the Adjust Balance dialog."},{"src":"https:\/\/ps.w.org\/devdiggers-buy-now-pay-later-for-woocommerce\/assets\/screenshot-6.png?rev=3779458","caption":"Installments screen with upcoming, due soon and overdue views and Mark paid."},{"src":"https:\/\/ps.w.org\/devdiggers-buy-now-pay-later-for-woocommerce\/assets\/screenshot-7.png?rev=3779458","caption":"Credit and approval settings."},{"src":"https:\/\/ps.w.org\/devdiggers-buy-now-pay-later-for-woocommerce\/assets\/screenshot-8.png?rev=3779458","caption":"Payment plan switches under Configuration &gt; General."}],"raw_content":"<!--section=description-->\n<p>Plenty of stores already let trusted customers pay later. They just do it with spreadsheets, invoices and reminder emails written by hand.<\/p>\n\n<p>Buy Now Pay Later for WooCommerce is a free <strong><a href=\"https:\/\/devdiggers.com\/product\/woocommerce-buy-now-pay-later\/\">WooCommerce buy now pay later plugin<\/a><\/strong> (BNPL) that turns that into a proper checkout option with installment payments and Net 30 terms. You approve the customers you trust and give each one a credit limit. They pick <strong>Pay in 4<\/strong> or <strong>Pay in 30 days<\/strong> at checkout, and the plugin tracks every installment, sends the reminders and lets them pay from My Account with any payment method you already accept.<\/p>\n\n<p>The credit is yours. There is no third party lender, no API key, no account to sign up for and no cut taken from your orders. Everything runs inside WooCommerce on your own server.<\/p>\n\n<h4>Quick links<\/h4>\n\n<ul>\n<li><a href=\"https:\/\/demo.devdiggers.com\/buy-now-pay-later-for-woocommerce\/\">Free Demo<\/a><\/li>\n<li><a href=\"https:\/\/demo.devdiggers.com\/woocommerce-postpaid\/\">Pro Demo<\/a><\/li>\n<li><a href=\"https:\/\/docs.devdiggers.com\/woocommerce-postpaid\/\">Documentation<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/support\/plugin\/devdiggers-buy-now-pay-later-for-woocommerce\/\">Support<\/a><\/li>\n<li><a href=\"https:\/\/devdiggers.com\/product\/woocommerce-buy-now-pay-later\/#free-vs-pro\">Free vs Pro Comparison<\/a><\/li>\n<li><a href=\"https:\/\/devdiggers.com\/product\/woocommerce-buy-now-pay-later\/\">Upgrade to Pro<\/a><\/li>\n<\/ul>\n\n<h4>How it works<\/h4>\n\n<ol>\n<li>A customer applies from the Pay Later section in My Account, or you let every logged in customer use it straight away.<\/li>\n<li>You approve them on the Customers screen and they get your store credit limit.<\/li>\n<li>At checkout they choose the Pay Later payment method and a plan: Pay in 4 or Pay in 30 days.<\/li>\n<li>The order total comes off their available credit and the installments are scheduled.<\/li>\n<li>Before each due date they get a reminder email with a link to pay. They pay the installment in My Account with card, bank transfer or any other gateway you run.<\/li>\n<li>Each payment goes back onto their credit, so they can shop again.<\/li>\n<\/ol>\n\n<h4>What the free plugin does<\/h4>\n\n<h3>Pay in 4 and Net 30 payment plans<\/h3>\n\n<p>Two ready made plans cover what most stores need. Customers choose one at checkout and see exactly what they will pay and when.<\/p>\n\n<ul>\n<li><strong>Pay in 4<\/strong>: four equal payments, one every two weeks. The first is due at purchase and the order stays on hold until it is paid, so your risk on a new customer is one quarter of the order.<\/li>\n<li><strong>Pay in 30 days<\/strong>: the full amount in one payment, 30 days after the order. Classic Net 30 terms for trade and repeat customers.<\/li>\n<li>Switch either plan on or off under Configuration &gt; General. Customers only see the plans their credit covers.<\/li>\n<li>No fees and no interest on either plan.<\/li>\n<\/ul>\n\n<h3>A store credit line for each customer<\/h3>\n\n<ul>\n<li>One credit limit for every approved customer, saved when their credit line starts so a later change never moves what they owe<\/li>\n<li>Add or remove dues by hand, with a note and an optional email to the customer<\/li>\n<li>Available credit shown under the payment method at checkout<\/li>\n<li>Hide Pay Later at checkout for orders below or above an amount you set<\/li>\n<\/ul>\n\n<h3>Customer approval<\/h3>\n\n<ul>\n<li>Manual review: customers apply in one click and you approve or reject them<\/li>\n<li>Or no review: every logged in customer can activate credit<\/li>\n<li>Optionally start the credit line the moment you approve someone<\/li>\n<li>Email to the store when a new application comes in, and to the customer when it is approved or rejected<\/li>\n<\/ul>\n\n<h3>Installment pricing on product pages<\/h3>\n\n<p>Showing \"or 4 payments of $25.00 every 2 weeks\" under the price is one of the simplest ways to lift order value, and it is on by default.<\/p>\n\n<ul>\n<li>Show it on product pages, in product lists and under the cart total<\/li>\n<li>Updates live when a shopper picks a variation<\/li>\n<li>Edit the text with placeholders such as {count}, {amount} and {interval}<\/li>\n<li>A Learn more link opens a short explainer with your active plans<\/li>\n<li>[ddwcpp_installments_message] shortcode for page builders and custom templates<\/li>\n<\/ul>\n\n<h3>Reminders and missed payments<\/h3>\n\n<ul>\n<li>A reminder email a set number of days before every installment is due<\/li>\n<li>An overdue notice the day after a missed payment, with a link to pay<\/li>\n<li>Optionally pause credit for overdue customers until they catch up. Checkout tells them why Pay Later is not available.<\/li>\n<li>Payments settle the oldest installment first<\/li>\n<li>Nine customer and store emails using your WooCommerce email design. Edit the subject, heading and message of each one, with placeholders such as {amount} and {due_date}, or switch it off<\/li>\n<\/ul>\n\n<h3>My Account Pay Later section<\/h3>\n\n<p>Customers get their own page under My Account, with tabs that switch without reloading.<\/p>\n\n<ul>\n<li>Available credit, what they owe and a usage meter<\/li>\n<li>Next payment with a one click Pay now button<\/li>\n<li>Every order on a plan, with its full schedule<\/li>\n<li>A complete history of purchases, payments, refunds and adjustments<\/li>\n<li>Rename the menu item and change its address, for example \/my-account\/pay-later\/<\/li>\n<\/ul>\n\n<h3>Orders, refunds and the admin dashboard<\/h3>\n\n<ul>\n<li>Refund a Pay Later order from WooCommerce and the amount goes back onto the customer's credit<\/li>\n<li>Cancelled and failed orders return the credit too<\/li>\n<li>The payment schedule shows on the order screen, the thank you page, the customer's order view and the order emails<\/li>\n<li>Record a payment you received outside the store, such as a bank transfer, from the Installments screen<\/li>\n<li>Dashboard with outstanding dues, credit used, repayments, repayment rate, overdue amounts, upcoming payments and charts<\/li>\n<li>Customers, Installments and Transactions screens with search and filters<\/li>\n<li>Works with the classic checkout and the WooCommerce Cart and Checkout blocks<\/li>\n<li>Compatible with High-Performance Order Storage (HPOS)<\/li>\n<li>Setup wizard that gets you running in a couple of minutes<\/li>\n<\/ul>\n\n<h4>Free vs Pro<\/h4>\n\n<p>The free plugin gives every approved customer one store credit line, the Pay in 4 and Pay in 30 days plans, reminders and the full admin. <a href=\"https:\/\/devdiggers.com\/product\/woocommerce-buy-now-pay-later\/\">Buy Now Pay Later Pro<\/a> adds the controls stores ask for once credit sales take off. You can see every Pro setting in the free plugin, marked with a PRO tag.<\/p>\n\n<h3>Plans and terms (Pro)<\/h3>\n\n<ul>\n<li>Plan builder: create and rename plans with their own number of payments, schedule, fee and order amount limits<\/li>\n<li>3, 6 or 12 monthly payments, weekly schedules, up to 60 installments<\/li>\n<li>Net 15, Net 45, Net 60 or any number of days<\/li>\n<li>A fixed or percentage fee per plan, shown before the customer chooses<\/li>\n<\/ul>\n\n<h3>Credit and risk (Pro)<\/h3>\n\n<ul>\n<li>A different credit limit per customer, edited inline on the Customers screen<\/li>\n<li>Late fees and a grace period, fixed or a percentage, charged once per missed payment<\/li>\n<li>Interest on repayments and partial payments with a minimum amount<\/li>\n<li>Document verification: customers upload an ID or business licence when they apply, stored in a private folder<\/li>\n<li>Offer credit to chosen user roles only, such as wholesale or B2B customers<\/li>\n<li>Keep chosen products and categories cash only<\/li>\n<\/ul>\n\n<h3>Messaging and design (Pro)<\/h3>\n\n<ul>\n<li>Show the installment price to approved customers only and pick which plan it advertises<\/li>\n<li>Rewrite the Learn more explainer with your own logo, steps and footnote<\/li>\n<li>Credit card style balance, tab styles, corners, eleven brand colors and your own labels<\/li>\n<\/ul>\n\n<h3>Admin tools (Pro)<\/h3>\n\n<ul>\n<li>Bulk actions for customers and installments<\/li>\n<li>CSV export of installments and transactions<\/li>\n<li>One click payment reminders<\/li>\n<\/ul>\n\n<p>Every customer, balance and installment from the free plugin carries over when you upgrade.<\/p>\n\n<h3>External services<\/h3>\n\n<p>Applications, balances, installments and transactions are stored in your WordPress database, and emails go out through the WooCommerce mailer. The plugin contains no licence checks, no update checks and no telemetry. It relies on the external services listed below.<\/p>\n\n<p><strong>1. Gravatar (avatar images)<\/strong><\/p>\n\n<ul>\n<li>What it is: Gravatar (gravatar.com), the avatar service operated by Automattic. Images are loaded from secure.gravatar.com through WordPress core's <code>get_avatar()<\/code> and <code>get_avatar_url()<\/code> functions.<\/li>\n<li>What it is used for: Showing the logged in administrator's avatar in the welcome header of the plugin dashboard, and customers' avatars on the dashboard, Customers, Installments and Transactions screens.<\/li>\n<li>When data is sent: When those admin screens are viewed and avatars are enabled under <strong>Settings &gt; Discussion<\/strong>. Turning avatars off there stops the requests.<\/li>\n<li>What data is sent: A hash of each shown user's email address inside the image URL, plus the usual request data of the administrator's browser such as IP address and user agent. Nothing is sent from the storefront.<\/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>The bundled DevDiggers framework, which draws the admin screens, connects to the two services below. Both run only inside the WordPress admin.<\/p>\n\n<p><strong>2. 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>3. 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 DevDiggers services 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<h3>Source code and build tools<\/h3>\n\n<p>The admin, storefront and checkout block JavaScript and CSS 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\/buy-now-pay-later-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>The build configuration is in <code>webpack.config.js<\/code> and <code>babel.config.js<\/code>. 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<ol>\n<li>In your WordPress admin go to Plugins &gt; Add New and search for \"Buy Now Pay Later for WooCommerce DevDiggers\".<\/li>\n<li>Click Install Now, then Activate. WooCommerce must be active.<\/li>\n<li>The setup wizard opens. Turn the program on, set the default credit limit, pick your plans and set the reminder.<\/li>\n<li>Go to WooCommerce &gt; Settings &gt; Payments and make sure the Pay Later method is enabled. You can change its title and description there.<\/li>\n<li>Approve your first customers under DevDiggers Plugins &gt; Pay Later &gt; Customers.<\/li>\n<\/ol>\n\n<p>To install manually, upload the <code>devdiggers-buy-now-pay-later-for-woocommerce<\/code> folder to <code>\/wp-content\/plugins\/<\/code> and activate it from the Plugins screen.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"is%20this%20a%20third%20party%20lender%3F\"><h3>Is this a third party lender?<\/h3><\/dt>\n<dd><p>No. You are the one giving credit, so you decide who gets it and how much. The plugin never sends customer data anywhere and takes no fee from your orders.<\/p><\/dd>\n<dt id=\"do%20customers%20need%20a%20card%20to%20use%20pay%20later%3F\"><h3>Do customers need a card to use Pay Later?<\/h3><\/dt>\n<dd><p>Not at checkout. They pay each installment later from My Account with whatever payment methods your store accepts, such as card, PayPal or bank transfer. Cash on delivery and cheque are hidden for installment payments.<\/p><\/dd>\n<dt id=\"what%20happens%20to%20the%20order%20with%20pay%20in%204%3F\"><h3>What happens to the order with Pay in 4?<\/h3><\/dt>\n<dd><p>The first payment is due on the day of the order. The order stays on hold until that first payment comes in, then WooCommerce processes it as usual. With Pay in 30 days the order is processed straight away.<\/p><\/dd>\n<dt id=\"can%20i%20offer%20net%2030%2C%20net%2060%20or%20other%20payment%20terms%3F\"><h3>Can I offer Net 30, Net 60 or other payment terms?<\/h3><\/dt>\n<dd><p>Net 30 is included as the Pay in 30 days plan. Net 15, Net 45, Net 60 or any other number of days is part of Pro.<\/p><\/dd>\n<dt id=\"can%20i%20give%20one%20customer%20a%20bigger%20credit%20limit%3F\"><h3>Can I give one customer a bigger credit limit?<\/h3><\/dt>\n<dd><p>Every customer gets the store credit limit you set under Configuration &gt; Credit &amp; Approval. Setting a different limit per customer is part of Pro.<\/p><\/dd>\n<dt id=\"what%20happens%20when%20a%20customer%20misses%20a%20payment%3F\"><h3>What happens when a customer misses a payment?<\/h3><\/dt>\n<dd><p>They get an overdue email with a link to pay. If you turn on Pause Credit they cannot use Pay Later again until they catch up. Late fees and a grace period are part of Pro.<\/p><\/dd>\n<dt id=\"can%20customers%20pay%20off%20everything%20at%20once%3F\"><h3>Can customers pay off everything at once?<\/h3><\/dt>\n<dd><p>Customers pay their installments one at a time, oldest first, from the Pay Later section in My Account. Paying any amount at once, up to the full balance, is a Pro feature.<\/p><\/dd>\n<dt id=\"what%20happens%20when%20i%20refund%20a%20pay%20later%20order%3F\"><h3>What happens when I refund a Pay Later order?<\/h3><\/dt>\n<dd><p>Refund it from the WooCommerce order screen as usual. The refunded amount goes back onto the customer's credit and comes off their open installments.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20the%20block%20checkout%3F\"><h3>Does it work with the block checkout?<\/h3><\/dt>\n<dd><p>Yes. Pay Later and the plan choice work in both the classic checkout and the Checkout block.<\/p><\/dd>\n<dt id=\"where%20do%20customers%20see%20what%20they%20owe%3F\"><h3>Where do customers see what they owe?<\/h3><\/dt>\n<dd><p>In the Pay Later section of My Account. You can rename it and change its address under Configuration &gt; General.<\/p><\/dd>\n<dt id=\"i%20used%20the%20pro%20plugin%20before.%20will%20my%20data%20carry%20over%3F\"><h3>I used the Pro plugin before. Will my data carry over?<\/h3><\/dt>\n<dd><p>Yes. The free plugin reads the same customers, balances, installments and transactions. Settings that only exist in Pro stay saved and come back when you activate Pro again.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0 - 2026-10-21<\/h4>\n\n<ul>\n<li>New: Pay Later payment method for the classic checkout and the Checkout block, with a plan choice and the customer's available credit.<\/li>\n<li>New: Pay in 4 (first payment at purchase, order held until it is paid) and Pay in 30 days plans, each with its own on\/off switch.<\/li>\n<li>New: Store credit line with one credit limit, manual or automatic approval and manual balance adjustments with a note.<\/li>\n<li>New: Installment price on product pages, product lists and the cart, updated for variations, plus the [ddwcpp_installments_message] shortcode and a Learn more explainer.<\/li>\n<li>New: Pay Later section in My Account with available credit, the next payment, every plan's schedule and full history. Customers pay installments with any payment method you accept.<\/li>\n<li>New: Reminder before every due date, overdue notice the day after, and an option to pause credit for overdue customers.<\/li>\n<li>New: Refunds, cancellations and failed orders return the credit automatically.<\/li>\n<li>New: Dashboard with dues, credit used, repayments, repayment rate, due and overdue totals, charts and widgets.<\/li>\n<li>New: Customers, Installments, Plans and Transactions screens, a setup wizard, HPOS support and nine editable customer and store emails.<\/li>\n<\/ul>","raw_excerpt":"Offer buy now pay later (BNPL) on your own credit: Pay in 4 installments or Net 30 terms, with credit limits and due date reminders. No lender.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/396199","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=396199"}],"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=396199"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=396199"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=396199"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=396199"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=396199"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=396199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}