The configurator editor a shop manager works in, the plugin's settings screens, and the product admin. The most valuable hooks here are the settings filters — they add fields to layers, choices, angles and 3D objects, and those fields then flow all the way to the frontend.
See the hook reference index for how to register callbacks.
Layer, choice, angle and 3D object fields
| Hook | Type | Arguments | Purpose |
|---|---|---|---|
mkl_pc_choice_default_settings | filter | $fields | Fields on a choice |
mkl_pc_choice_settings_sections | filter | $sections | Sections those fields group into |
mkl_pc_layer_default_settings | filter | $settings | Fields on a layer |
mkl_pc_layer_settings_sections | filter | $sections | Sections for layer fields |
mkl_pc_angle_default_settings | filter | $settings | Fields on an angle |
mkl_pc_angle_settings_sections | filter | $sections | Sections for angle fields |
mkl_pc_object3d_default_settings | filter | $settings | Fields on a 3D object |
mkl_pc_layer_types | filter | $types | Available layer types |
mkl_pc_display_modes | filter | $modes | Available layer display modes |
mkl_pc_object3d_item_types | filter | $types | Available 3D object types |
mkl_pc_3d_settings_sections | filter | $sections | Sections in the per-product 3D settings |
Editor markup
| Hook | Type | Arguments | Purpose |
|---|---|---|---|
mkl_pc_choice_fields | action | (none) | Inside the choice settings template |
mkl_pc_layer_fields | action | (none) | Inside the layer settings template |
mkl_pc_layer_settings | action | (none) | Inside the layer settings panel |
mkl_pc_angle_fields | action | (none) | Inside the angle settings template |
mkl_pc_angle_settings | action | (none) | Inside the angle settings panel |
mkl_pc_object3d_fields | action | (none) | Inside the 3D object settings template |
mkl_pc_object3d_settings | action | (none) | Inside the 3D object settings panel |
mkl_pc_admin_objects3d_add_tiles | action | (none) | Extra tiles on the "add 3D object" screen |
mkl_pc_layers_toolbar_dropdown | action | (none) | Items in the layers toolbar dropdown |
mkl_pc_layers_toolbar_dropdown_top | action | (none) | Items at the top of it |
mkl_pc_admin_templates_before | action | (none) | Before the admin templates are printed |
mkl_pc_admin_templates_after | action | (none) | After they are |
tmpl-mkl-pc-setting--repeater | action | (none) | Inside a repeater field template |
tmpl-mkl-pc-setting--repeater-option | action | (none) | Inside one repeater row |
Product admin screens
| Hook | Type | Arguments | Purpose |
|---|---|---|---|
mkl_pc_admin_home_tab | action | (none) | The configurator's Home tab |
mkl_pc_admin_home_actions | filter | $actions, $id, $product | Action buttons on it |
mkl_pc_admin_home_actions_after | action | $id, $product | After those buttons |
mkl_pc_admin_general_tab | action | (none) | The General tab |
mkl_pc_admin_general_tab_before_start_button | action | (none) | Before its start button |
mkl_pc_admin_instructions_before_content | action | $id, $product | Before the instructions block |
mkl_pc_admin_instructions_after | action | $id | After it |
mkl_pc_admin_documentation_content | action | $id, $product | The documentation panel |
mkl_pc_admin_global_configurator_content | action | $id, $product | The global configurator panel |
mkl_wc_general_metaboxe_classes | filter | $classes | Classes on the general metabox |
mkl_pc_admin_scripts | filter | $scripts | Editor scripts to enqueue |
mkl_pc_admin_scripts_product_page | action | (none) | After they are enqueued |
PC_lang | filter | $lang | The strings and config passed to the editor |
Settings screens and menu
| Hook | Type | Arguments | Purpose |
|---|---|---|---|
mkl_pc_settings_tabs | filter | $tabs, $active | Tabs on the settings page |
mkl_pc_settings_before_tabs | action | $active | Before the tab bar |
mkl_pc_settings_content_after | action | $active | After the tab content |
mkl_pc/register_settings | action | $settingsPage | Register settings of your own |
mkl_product_configurator_admin_menu | filter | $menu | The admin menu definition |
mkl_pc_admin_menu | action | $menuSlug | After the menu is registered |
mkl_pc_admin_icon_registry | filter | $icons | SVG icons available to the editor |
mkl_pc_addons_catalog | filter | $addons | The add-ons listed on the Add-ons tab |
mkl_pc_addon_card_actions | filter | $html, $addon, $isInstalled | Buttons on an add-on card |
mkl_pc_addons_tab_before | action | (none) | Before the Add-ons tab content |
mkl_pc_theme_color_settings | filter | $settings | Theme colour settings |
mkl_pc_them_color_variables | filter | $rules | CSS custom properties they produce |
mkl_pc_customizer_settings | action | $wpCustomize, $that | Customizer settings |
mkl_pc_customizer_settings_before | action | $wpCustomize, $that | Before them |
Orders in the admin
| Hook | Type | Arguments | Purpose |
|---|---|---|---|
mkl_pc_admin_order_item | action | $layer | Beside a configured layer on an order |
mkl/order/admin_meta/display_value | filter | $value, $orderItem, $configuratorData | The configuration shown on an order |
mkl/order/override_saved_meta | filter | $override | Whether to replace the stored meta display |
3D model uploads
| Hook | Type | Arguments | Purpose |
|---|---|---|---|
mkl_pc_3d_should_unzip_attachment | filter | false, $attachmentId, $file | Whether to unzip an uploaded archive |
mkl_pc_3d_allowed_zip_extensions | filter | $extensions | Extensions allowed inside it |
mkl_pc_3d_max_zip_bytes | filter | $bytes, $attachmentId | Largest archive accepted |
mkl_pc_3d_max_extracted_bytes | filter | $bytes, $attachmentId | Largest extracted size accepted |
mkl_pc_3d_max_zip_files | filter | $count, $attachmentId | Most files accepted |
mkl_pc_3d_premium_addon_url | filter | $url | Where the 3D Premium upsell links |
mkl_pc_choice_default_settings
The most-used hook in the whole plugin. It declares the fields a shop manager sees on a choice,
and anything you add is stored with the choice, printed into the frontend data, and available in
templates as data.your_field.
add_filter( 'mkl_pc_choice_default_settings', function ( $fields ) { $fields['_general']['fields']['supplier_code'] = array( 'label' => __( 'Supplier code', 'my-plugin' ), 'type' => 'text', 'priority' => 130, ); return $fields;}, 30 );
Field types are text, number, textarea, checkbox, select and html. A condition
expression shows a field only for certain layer types.
Adding custom data to choices works through this from end to end, including how to display the value on the frontend.
A field added here is not automatically saveable. The data layer has its own allowlist — add
the same key to mkl_pc_db_fields or the value is
dropped on save.
mkl_pc_layer_default_settings and mkl_pc_angle_default_settings
The same pattern for layers and angles.
add_filter( 'mkl_pc_layer_default_settings', function ( $settings ) { $settings['_general']['fields']['internal_note'] = array( 'label' => __( 'Internal note', 'my-plugin' ), 'type' => 'textarea', 'priority' => 200, ); return $settings;} );
The *_settings_sections filters
Sections are the collapsible groups fields sit in. Add one before adding fields to it:
add_filter( 'mkl_pc_choice_settings_sections', function ( $sections ) { $sections['_fulfilment'] = array( 'id' => 'fulfilment', 'label' => __( 'Fulfilment', 'my-plugin' ), 'priority' => 90, 'collapsible' => true, 'fields' => array(), ); return $sections;} );
Core reserves _general, _threed and _translations. Priorities run from 10 upwards; 3D sits
at 20 and translations at 140.
mkl_pc_layer_types and mkl_pc_display_modes
layer_types is the list a shop manager picks from — simple, multiple, group, form,
summary, text_overlay. Add-ons add their own here.
add_filter( 'mkl_pc_layer_types', function ( $types ) { $types['my_type'] = __( 'My layer type', 'my-plugin' ); return $types;} );
Adding an entry only puts it in the dropdown. You also need a frontend view for it — see
PC.fe.layer.beforeRenderChoices, which is how Multiple Choice and Text Overlay
substitute theirs.
mkl_pc_object3d_item_types and mkl_pc_3d_settings_sections
The kinds of object a 3D configurator can hold — gltf, light, environment,
environment_hdri, environment_cubemap, animation — and the sections of the per-product 3D
settings panel.
3D Premium registers its AR and postprocessing sections at priority 20. Without the add-on, core registers placeholder sections in their place at priority 15. Core forces the reset section last at 100. Use a priority below 100 or your section lands after the reset button.
PC_lang
Everything the editor's JavaScript reads: labels, defaults, type lists, the icon registry, 3D decoder paths. Filter it to add data your own admin scripts need.
add_filter( 'PC_lang', function ( $lang ) { $lang['my_plugin'] = array( 'endpoint' => admin_url( 'admin-ajax.php' ) ); return $lang;} );
mkl_pc_admin_scripts and mkl_pc_admin_scripts_product_page
The filter takes the list of editor scripts before they are registered — the supported way to inject a script into the editor's dependency chain. The action fires afterwards, for anything that must load later.
add_action( 'mkl_pc_admin_scripts_product_page', function () { wp_enqueue_script( 'my-editor-extras', '…', array( 'mkl_pc/js/admin' ), '1.0', true );} );
mkl_pc/register_settings
Fires with the settings page object, which is where you register settings of your own rather than filtering the defaults.
add_action( 'mkl_pc/register_settings', function ( $settings_page ) { // $settings_page exposes the plugin's own registration API.} );
Pair it with mkl_pc_settings_tabs to give them a home:
add_filter( 'mkl_pc_settings_tabs', function ( $tabs, $active ) { $tabs['my_tab'] = __( 'My settings', 'my-plugin' ); return $tabs;}, 10, 2 );
mkl_pc_admin_home_actions and …_after
Buttons on the configurator's Home tab — the natural place for "import", "duplicate", or a link into your own tooling.
add_filter( 'mkl_pc_admin_home_actions', function ( $actions, $id, $product ) { $actions[] = '<a class="button" href="' . esc_url( my_export_url( $id ) ) . '">' . esc_html__( 'Export', 'my-plugin' ) . '</a>'; return $actions;}, 10, 3 );
mkl_pc_admin_order_item and mkl/order/admin_meta/display_value
The first prints beside each configured layer on an order screen, receiving the MKL\PC\Choice.
The second filters the whole rendered configuration.
add_action( 'mkl_pc_admin_order_item', function ( $layer ) { if ( $code = $layer->get_choice( 'supplier_code' ) ) { echo ' <code>' . esc_html( $code ) . '</code>'; }} );
3D archive upload limits
A shop manager can upload a .zip containing a glTF model and its textures. The limits are
deliberately tight, because extraction happens on the server:
add_filter( 'mkl_pc_3d_max_zip_bytes', function ( $bytes, $attachment_id ) { return 200 * MB_IN_BYTES;}, 10, 2 );
mkl_pc_3d_allowed_zip_extensions is the allowlist of what may be extracted, and
mkl_pc_3d_max_extracted_bytes guards against zip bombs — an archive that is small until it is
not. Raise these only as far as you actually need, and never widen the extension list to
include anything executable.
mkl_pc_3d_should_unzip_attachment decides whether an archive is processed at all; returning
false leaves the upload as an inert file.
mkl_pc_addons_catalog and mkl_pc_addon_card_actions
The add-ons listed on the Add-ons tab, and the buttons on each card. Useful for an agency shipping its own extensions alongside the official ones.
Theme colours
mkl_pc_theme_color_settings declares the colour settings a merchant sees;
mkl_pc_them_color_variables turns them into CSS custom properties. (The second name is
misspelled in core and kept that way for compatibility.)
add_filter( 'mkl_pc_theme_color_settings', function ( $settings ) { $settings['highlight'] = array( 'default' => '#ff0', 'label' => __( 'Highlight', 'my-plugin' ), ); return $settings;} );
Editor template actions
mkl_pc_choice_fields, mkl_pc_layer_fields, mkl_pc_angle_fields and mkl_pc_object3d_fields
print into the editor's Underscore templates. In almost every case the *_default_settings
filters are the better tool — they give you a real field with storage, validation and
translation. Reach for these only for markup no field type can express.