Data Storage and Migration
Options
Section titled “Options”| Option | Contents | Autoloaded |
|---|---|---|
wcdp_pro_admin_general_option |
Button position, four button colors, allowed file_format list, allowed wcdp_category list. |
No |
wcdp_pro_ftype_cat_flag |
One-time flag marking that existing installs were pre-filled with default formats and categories. | No |
wcdp_pro_urlkey_migrated |
Flag marking the legacy meta migration complete. | No |
wcdp_pro_urlkey_migrate_offset |
Paging offset used while the migration runs. | No |
edd_wbcom_wcdp_pro_license_key |
Stored EDD license key. | Default |
edd_wbcom_wcdp_pro_license_status |
License status (valid, invalid, expired, and so on). | Default |
wcdp_pro_admin_general_option shape
Section titled “wcdp_pro_admin_general_option shape”array( 'preview_button_display_position' => 'woocommerce_before_add_to_cart_button', // or ..._after_... 'preview_button_text_color' => '#ffffff', 'preview_button_hover_text_color' => '#ffffff', 'preview_button_bg_color' => '', 'preview_button_hover_bg_color' => '', 'file_format' => array( 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'google_sheets', 'google_docs', 'onedrive', 'dropbox' ), 'wcdp_category' => array( /* product_cat term IDs */ ),);Product meta
Section titled “Product meta”Document data is stored in the wcdp_documents product meta, which is owned by the free
base plugin. The base reader and writer use the wcdp_file_urls sub-key for URLs. Pro
reads and writes through the base plugin’s WCDP_Documents API rather than touching the meta
directly, so there is one storage rule for both plugins.
Legacy meta migration
Section titled “Legacy meta migration”Before the current architecture, Pro stored URLs under the legacy wcdp_pro_file_urls
sub-key. A one-time migration rewrites each product through the base writer so it uses the
canonical wcdp_file_urls key and drops the legacy one.
The migration:
- Runs on
admin_initand only when the baseWCDP_Documentsclass is present. - Is guarded by the
wcdp_pro_urlkey_migratedoption flag, so it runs once regardless of version changes. - Is batched (50 products per admin request) so a large catalog does not time out.
- Is idempotent: re-saving an already-canonical product writes the same data, so a re-run is a no-op.
Uninstall
Section titled “Uninstall”Uninstalling Pro removes only its own options: wcdp_pro_admin_general_option,
wcdp_pro_ftype_cat_flag, wcdp_pro_urlkey_migrated, wcdp_pro_urlkey_migrate_offset, and
the two EDD license options.
It deliberately does not delete the wcdp_documents product meta. That store belongs to
the free base plugin, which removes it in its own uninstall. Removing only Pro leaves every
product’s documents intact for the free plugin.

