PHP hooks reference
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
| Filter | Purpose |
|---|---|
veyo_admin_menus | Add or modify entries in the Product Personalizer admin menu. |
veyo_product_settings | Modify the designer config payload sent to the front-end Vue app for a product (legacy alias: veyop_designer_config). |
veyo_custom_css | Append or modify custom CSS injected into the designer. |
veyo_inline_styles | Modify inline style output for the designer shell. |
veyo_calculate_custom_price | Adjust the computed personalization price for a design. |
veyo_cart_item_data | Add or modify custom data attached to a WooCommerce cart item. |
veyo_order_item_meta | Add or modify order line-item meta saved with a design. |
veyo_pricing_components | Return additional validated pricing line items for a quote. Core owns the final arithmetic — addons only contribute components. |
veyop_addon_should_load_file | Control whether a specific addon asset file should load for the current request. |
veyop_addon_designer_assets | Modify the list of designer JS/CSS assets enqueued for enabled addons. |
veyop_export_item_svg | Modify the SVG fragment generated for a single design item during export. |
veyop_export_composed_svg | Modify the fully composed SVG for a view before rasterization. |
veyop_export_format_handlers | Register a custom export format handler (e.g. an embroidery .dst writer). |
veyop_design_record_resolve | Modify how a saved design record is resolved/loaded. |
veyop_design_save_data | Modify the data payload written when a design is saved. |
veyop_designer_calculate_price | Lower-level hook into the designer's price calculation, upstream of veyo_pricing_components. |
veyop_themes_discovered | Modify the list of discovered designer UI themes. |
veyop_active_theme_slug / veyop_active_theme | Override which designer theme is active. |
veyop_theme_should_load_file | Control whether a specific theme asset file loads. |
veyop_theme_designer_assets | Modify assets enqueued for the active theme. |
veyop_designer_theme_config | Modify the theme configuration payload sent to the designer. |
Actions
| Action | Fires |
|---|---|
veyo_before_customer_design_view | Before the customer-facing designer renders on a product page. |
veyo_after_customer_design_view | After the customer-facing designer renders. |
veyo_product_personalizer_menu | While the admin menu is being built — a lower-level companion to the veyo_admin_menus filter. |
veyop_addons_discovered | After core finishes scanning plugins/ for addon packages. |
veyop_addon_before_include / veyop_addon_after_include | Immediately before/after an enabled addon's server entrypoint is loaded. |
veyop_order_item_design_saved | After a design is attached to a WooCommerce order line item. |
veyop_design_saved | Whenever a customer design is saved (draft or final). |
veyop_theme_before_include / veyop_theme_after_include | Immediately 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.