PHP hooks reference

Deprecated: PHP hooks for extensibility have been removed from Veyo. For custom development needs, contact our custom development team or reach out to support@veyodesigner.com.

This documentation is kept for reference only. Server-side extension points for addon bootstrap.php files are no longer supported. Use custom development services for specialized integrations.

Registering a hook

<?php
// plugins/my-addon/bootstrap.php

VeyopHooks::addFilter('veyo_pricing_components', function ($components, $context) {
    $components[] = [
        'label' => 'My Addon Fee',
        'amount' => 1.50,
    ];
    return $components;
}, 10, 2);

VeyopHooks::addAction('veyop_design_saved', function ($design, $context) {
    // e.g. write an audit log entry
});

These calls also work as plain WordPress add_filter / add_action on a WordPress site — VeyopHooks is a thin portable wrapper, not a replacement API you must learn from scratch.

Filters

FilterPurpose
veyo_admin_menusAdd or modify entries in the Product Personalizer admin menu.
veyo_product_settingsModify the designer config payload sent to the front-end Vue app for a product (legacy alias: veyop_designer_config).
veyo_custom_cssAppend or modify custom CSS injected into the designer.
veyo_inline_stylesModify inline style output for the designer shell.
veyo_calculate_custom_priceAdjust the computed personalization price for a design.
veyo_cart_item_dataAdd or modify custom data attached to a WooCommerce cart item.
veyo_order_item_metaAdd or modify order line-item meta saved with a design.
veyo_pricing_componentsReturn additional validated pricing line items for a quote. Core owns the final arithmetic — addons only contribute components.
veyop_addon_should_load_fileControl whether a specific addon asset file should load for the current request.
veyop_addon_designer_assetsModify the list of designer JS/CSS assets enqueued for enabled addons.
veyop_export_item_svgModify the SVG fragment generated for a single design item during export.
veyop_export_composed_svgModify the fully composed SVG for a view before rasterization.
veyop_export_format_handlersRegister a custom export format handler (e.g. an embroidery .dst writer).
veyop_design_record_resolveModify how a saved design record is resolved/loaded.
veyop_design_save_dataModify the data payload written when a design is saved.
veyop_designer_calculate_priceLower-level hook into the designer's price calculation, upstream of veyo_pricing_components.
veyop_themes_discoveredModify the list of discovered designer UI themes.
veyop_active_theme_slug / veyop_active_themeOverride which designer theme is active.
veyop_theme_should_load_fileControl whether a specific theme asset file loads.
veyop_theme_designer_assetsModify assets enqueued for the active theme.
veyop_designer_theme_configModify the theme configuration payload sent to the designer.

Actions

ActionFires
veyo_before_customer_design_viewBefore the customer-facing designer renders on a product page.
veyo_after_customer_design_viewAfter the customer-facing designer renders.
veyo_product_personalizer_menuWhile the admin menu is being built — a lower-level companion to the veyo_admin_menus filter.
veyop_addons_discoveredAfter core finishes scanning plugins/ for addon packages.
veyop_addon_before_include / veyop_addon_after_includeImmediately before/after an enabled addon's server entrypoint is loaded.
veyop_order_item_design_savedAfter a design is attached to a WooCommerce order line item.
veyop_design_savedWhenever a customer design is saved (draft or final).
veyop_theme_before_include / veyop_theme_after_includeImmediately before/after a designer theme's files load.

REST route registration

Don't register your own rest_api_init hook. Core dispatches a single veyop_register_rest_routes action from its own rest_api_init handler — hang your register_rest_route() calls off that instead, so every addon's routes register in one place and in a predictable order. See REST API reference.