DK Base Plugin Docs

Welcome to the DK Base Plugin Docs page. Use these sections to configure shared DK plugin settings, manage DK plugin installs and updates, tune WooCommerce display behavior, and understand the shared frontend tools used by child plugins. If you're still unable to find the help you need or would like to request a new feature or setting, please email me.
Setup Overview
Base Plugin Settings
WooCommerce Product Data
Mini Cart Settings
Buy Blocks and Language Filter
Managing DK Plugins

Setup Overview

DK Base Plugin adds shared WooCommerce product fields, configurable buy blocks, mini cart controls, language filtering, and the DK Plugins Home management screen. It also supplies the common settings, update services, helpers, and frontend assets used by plugins such as DK WC Books, DK WC Music, DK WC Store, and DK WC Merch.

WooCommerce must be installed and active because DK Base Plugin works with WooCommerce products, product attributes, product categories, carts, and orders. DK plugins that depend on DK Base Plugin also require it to remain active.

Main Admin Areas

  • DK Plugins -> Home: Shows available DK plugins, installed and update status, documentation links, descriptions, dependencies, and install, update, activation, and removal actions.
  • DK Plugins -> Base Plugin: Stores global settings shared by DK plugins.
  • WooCommerce Product Data -> DK: Adds DK-specific product metadata used by Books, Store, Merch, and shared buy blocks.
  • Plugins and Updates: Uses DK Base Plugin update metadata so DK plugins can appear in the standard WordPress update screens.

Recommended First Pass

  1. Install and activate WooCommerce.
  2. Install and activate DK Base Plugin.
  3. Create the WooCommerce product categories and attributes needed by the DK plugins you plan to use.
  4. Open DK Plugins -> Base Plugin and configure the shared Global Settings, Book settings, Music settings, Mini Cart settings, and Buy Block settings that apply to your site.
  5. Install or update child DK plugins from DK Plugins -> Home.

Base Plugin Settings

The Base Plugin Settings page stores options that child DK plugins read when querying products, building buy blocks, displaying product metadata, and rendering shared frontend controls.

Some tabs only appear when the related child plugin is installed and active. For example, Global Book Settings appears when DK WC Books is active, and Global Music Settings appears when DK WC Music is active.

Global Settings

  • Show Private Results When Logged In: Allows editors to see private WooCommerce products in DK plugin results for testing.
  • Enable Lightbox: Enables the shared product image lightbox and loads the lightbox modal on the frontend.
  • Use Parent and Child Descriptions For Variations: Allows supported displays to combine parent and variation descriptions.
  • Genre Attribute: Selects the WooCommerce attribute used as the shared genre source.
  • Format Attribute: Selects the WooCommerce attribute used for product format labels and buy block options.
  • Preorder Display Text: Sets the text shown above the buy block when a product is marked as a preorder and has a future release date.

Global Book Settings

These settings appear when DK WC Books is active and define how book products are found and labeled across the DK book-related plugins.

  • Book Series Attribute: Selects the attribute used for the book series name.
  • Book Series Number Attribute: Selects the attribute used for the book number or series position.
  • Book Categories: Selects the top-level WooCommerce product categories used when querying book products.
  • Default Selected Book Format: Selects the default format shown first in book buy blocks. Variable product default selections can override this.
  • Book Language Attribute: Selects the attribute used for language labels and language-aware displays.
  • Separate Book Subtitle: Splits book titles at a colon so the title and subtitle can display on separate lines where supported.

Global Music Settings

These settings appear when DK WC Music is active and define how music products are found and labeled across music pages, cards, and archive displays.

  • Music Categories: Selects the WooCommerce product categories used when querying music products.
  • Album Attribute: Selects the attribute used to identify album names.
  • Artist Attribute: Selects the attribute used for artist names.
  • Song Number Attribute: Selects the attribute used for track order or song number values.
  • Record Label Attribute: Selects the attribute used for record label display.

WooCommerce Product Data

DK Base Plugin adds a DK tab to WooCommerce product data. The values saved there are used by child DK plugins and shared buy block output.

DK Product Tab

  • Is Book Bundle or Collection?: Marks the product as a collection, box set, bundle, trilogy, omnibus, or other grouped book product.
  • Allow Pre-order?: Marks the product as available for preorder when the release date is in the future.
  • Release Date: Sets the release date shown by shared buy blocks for preorder products.
  • Does Product Use RTL Language?: Marks products that should use right-to-left language styling where supported by child plugins.

Variation Fields

Variable product variations include extra DK fields for more precise cart and display behavior.

  • Sold Individually: Restricts the selected variation so only one copy of that exact variation can be purchased in one order.
  • Extra Variation Attributes: Adds display-only variation details. Enter one value per line using field_label|field_value, such as Pages|345.

Product Page and Cart Behavior

DK Base Plugin adds configured format, language, series, and series number details to supported WooCommerce displays. It also adjusts cart notices so customers see clearer product, format, and language labels.

Virtual or downloadable-only orders are automatically completed after checkout. Child plugins can also use DK Base Plugin's product redirect filter to send a WooCommerce product page to a related DK display page.

Mini Cart Settings

The Mini Cart Settings tab controls the shared DK mini cart. When enabled, the mini cart is output on frontend pages except the cart and checkout pages.

Mini Cart Options

  • Enable Mini Cart: Replaces the normal WooCommerce mini cart output with the DK mini cart behavior and AJAX fragments.
  • Show Items List: Shows the expandable cart item list in the mini cart.
  • Show Empty Cart Button: Adds an Empty Cart button and loads the supporting empty-cart script.
  • Show Mini Cart Shadow: Adds a box shadow to the floating mini cart container.

Mini Cart Display

Use Mini Cart Display settings to control the container background color, text color, border color, border width, and border radius. The settings page includes a mini cart previewer so you can review changes before saving.

Mini Cart Buttons

Use Mini Cart Buttons settings to control button background, text, border, and hover colors for mini cart actions such as View Cart, Checkout, and Empty Cart.

Buy Blocks and Shared Displays

DK Base Plugin provides the shared buy block used by multiple DK plugins. The buy block displays product format or variation choices, prices, sale-price styling, out-of-stock states, preorder messaging, quantity controls where supported, and Add To Cart buttons.

Buy Block Settings

  • Customize Threshold: Shows all choices when the buy block contains no more than this number. Larger buy blocks show the default selection and reveal the remaining choices through a Customize control. The default is 6.
  • Button Colors: Sets the default, hover, selected, and selected-checkmark colors used by shared buy option buttons.
  • Sale Price Color: Sets the color used when a product has a sale price.
  • Highlight Sales Price: Adds a pulsing highlight to sale prices.
  • Sale Price Box Shadow Color: Sets the highlight color used by the pulsing sale-price effect.
  • Include Out Of Stock: Allows out-of-stock options to remain visible in the buy block as disabled choices.
  • Out Of Stock Colors: Sets the border, background, and text colors for disabled out-of-stock choices.

Variation Picker

For supported variable products, the shared buy block can render compact variation controls. Merch products can display color swatches when color data is available from DK WC Merch.

The picker follows the parent product's variation attribute order so size, color, format, or other variation controls stay consistent with WooCommerce setup.

Language Filter Shortcode

Use the language filter shortcode to add a searchable language selector to a page:

[dk_language_filter]

  • id: Sets the select field ID. If omitted, one is generated.
  • name: Sets the request parameter name. The default is language.
  • selected: Sets the currently selected language by name, native name, code, or slug.
  • placeholder: Sets the select placeholder text.
  • show_all_option: Shows or hides the All Languages option.
  • all_label: Sets the All Languages option label.
  • auto_submit: Submits the parent form when a language is selected.
  • aria_label: Sets the accessible label for the selector.
  • class: Adds custom CSS classes to the select field.

Managing DK Plugins

The DK Plugins Home page lists available DK plugins from the remote plugin list and compares that data with the plugins installed on the current WordPress site. Cards in each status group are sorted by the displayed plugin name.

The menu badge shows how many DK plugin updates are available.

Plugin Status Groups

  • Updates Found: Installed DK plugins with a newer remote version available.
  • Installed: Installed and active DK plugins that are current.
  • Inactive: Installed DK plugins that are not active.
  • Available Plugins: DK plugins available remotely but not installed on this site.
  • Retired Plugins: Retired plugins still installed on this site, with replacement links and manual migration guidance. They are excluded from the Home update count and bulk updates; maintenance updates remain available through WordPress Plugins.
  • Dependencies Missing: Uninstalled DK plugins that require one or more plugins not currently installed.

Plugin Actions

  • Install: Downloads and installs the selected plugin when dependencies are satisfied.
  • Update: Downloads and installs the newer remote version.
  • Activate: Activates an installed plugin.
  • Deactivate: Deactivates an active plugin.
  • Uninstall: Removes an installed plugin when the current user has permission.
  • Documentation: Opens the plugin's public documentation page in a new browser tab.
  • MORE: Opens the full description supplied by the plugin's remote info.json metadata.

Bulk Updates

When updates are available, select individual plugin cards or use Select all updates, then choose Update Selected. DK Base Plugin processes updates one at a time, keeps card actions disabled until the queue and final grid refresh finish, and updates DK Base Plugin first when it is included so dependent plugins use its latest shared code.

A completion message reports how many updates succeeded or failed. The plugin grid and DK Plugins menu badge refresh after the queue completes.

Retirement and Migration

Retired plugins are hidden from new installations. Use the Retired plugins & migration guides link on Home or the documentation index to browse their preserved documentation. Replacements are installed and configured manually; retirement never automatically deactivates, removes, or migrates an existing plugin.

Dependencies and Updates

DK plugin metadata can declare required plugins. If a required plugin is missing, DK Base Plugin blocks install actions that would leave the site in an incomplete state.

DK Base Plugin also merges installed DK child plugin updates into WordPress core update data so updates can appear on Plugins and Dashboard -> Updates, not only on the DK Plugins Home page.

Purge Update Cache

Use Purge Update Cache when the DK Plugins page and the standard WordPress update screens appear out of sync. The button clears DK update caches and WordPress update transients, then asks WordPress to check plugin updates again.