Skip to main content
Loading Support Center Preparing the latest guides, releases, and feature request updates.
Loading guides Preparing the right Knowledge Base content for this platform.
WordPress hooks and filters reference | Chamevo Support Center
Support / Knowledge Base / WordPress / Developer Reference / WordPress hooks and filters reference Chamevo provides WordPress action hooks and filters that let developers customize the plugin's behavior β modify the customizer configuration, intercept order data, control which products show the customizer, and adjust email notifications.
Type: Filter
File: src/functions.php
Controls whether the product customizer is enabled for a specific post/product.
apply_filters('chamevo_designer_enabled', bool $enabled, int $post_id): bool
Parameter Type Description $enabledboolWhether the customizer is currently enabled for this post $post_idintThe WordPress post/product ID
Example: Disable the customizer for a specific product:
add_filter('chamevo_designer_enabled', function($enabled, $post_id) {
if ($post_id === 123) {
return false;
}
return $enabled;
}, 10, 2);
Type: Filter
File: src/Frontend/ProductDesigner.php
Modify the product customizer options before they are sent to the frontend.
apply_filters('chamevo_app_options', array $options, int $product_id): array
Parameter Type Description $optionsarrayThe customizer configuration options $product_idintThe Chamevo product ID
Example: Force a specific module order:
add_filter('chamevo_app_options', function($options, $product_id) {
$options['mainBarModules'] = ['images', 'text', 'graphics'];
return $options;
}, 10, 2);
Type: Filter
File: src/Frontend/ProductDesigner.php
Modify the complete frontend configuration object (includes product data, options, and UI settings).
apply_filters('chamevo_frontend_setup_configs', array $configs): array
chamevo_post_enabledType: Action
File: src/Frontend/ProductDesigner.php
Fires when a Chamevo-enabled post/product page is loading.
do_action('chamevo_post_enabled', WP_Post $post, PostSettings $product_settings)
Type: Action
File: src/Frontend/ProductDesigner.php
Fires immediately before the product customizer HTML is rendered.
do_action('chamevo_before_product_designer')
Type: Action
File: src/Frontend/ProductDesigner.php
Fires immediately after the product customizer HTML is rendered.
do_action('chamevo_after_product_designer', WP_Post $post)
Type: Action
File: src/Frontend/Woo/Product.php
Fires at the end of the WooCommerce cart form output for Chamevo products.
do_action('chamevo_product_designer_form_end', PostSettings $product_settings)
Type: Filter
File: src/Frontend/FileUpload/RemoteImageHandler.php
Add domains to the trusted image host whitelist for remote image uploads.
apply_filters('chamevo_trusted_image_hosts', array $hosts): array
Type: Filter
File: src/Frontend/Woo/Order.php, src/Services/WooCommerceOrderService.php
Modify or intercept customization data when a new order is placed. This is the central hook for all order types (WooCommerce, Shortcode, Gravity Forms).
apply_filters('chamevo_new_order_item_data', array $chamevo_data, string $order_type, array $additional_data): array
Parameter Type Description $chamevo_dataarrayThe customization data (product JSON, thumbnail, Printful options) $order_typestringOrder source: 'wc', 'shortcode', or 'gf' $additional_dataarrayContains order_id, item_id, item, customer_mail
Type: Action
File: src/Frontend/Woo/Cart.php
Fires after a customized product is added to the WooCommerce cart.
do_action('chamevo_wc_add_to_cart', string $cart_item_key, int $product_id, int $quantity, int $variation_id, array $variation, array $cart_item_data)
Type: Action
File: src/Services/WooCommerceOrderService.php
Fires after a new WooCommerce order with Chamevo data is processed.
do_action('chamevo_wc_new_order_processed', int $order_id, int $item_id, array $chamevo_data, array $additional_data)
Type: Filter
File: src/Frontend/Woo/Cart.php
Modify the price of a customized cart item.
apply_filters('chamevo_wc_cart_item_price', float $price, array $cart_item, array $chamevo_data): float
Type: Action
File: src/Services/WooCommerceOrderService.php
Fires before the WooCommerce order notification email is sent.
do_action('chamevo_wc_order_mail', int $order_id, int $item_id, string $customer_name, string $customer_email, string $message, array $chamevo_data)
These filters let you modify each part of the order notification email:
Filter Parameters Returns chamevo_wc_order_mail_to$to, $order_id, $item_id, $datastringchamevo_wc_order_mail_subject$subject, $order_id, $item_id, $datastringchamevo_wc_order_mail_message$message, $order_id, $item_id, $datastringchamevo_wc_order_mail_headers$headers, $order_id, $item_id, $datastringchamevo_wc_order_mail_attachments$attachments, $order_id, $item_id, $dataarray
Modify Chamevo data before it is saved to a WooCommerce order item.
apply_filters('chamevo_wc_update_order_item_data', array $data, int $order_id, int $item_id): array
Modify Chamevo data when it is retrieved from a WooCommerce order item.
apply_filters('chamevo_wc_get_order_item_data', array $data, int $order_id, int $item_id): array
Fires after Chamevo data is updated on a WooCommerce order item.
do_action('chamevo_wc_order_item_data_updated', int $order_id, int $item_id, array $data)
Fires after Chamevo data is deleted from a WooCommerce order item.
do_action('chamevo_wc_order_item_data_deleted', int $order_id, int $item_id)
Type: Filter
File: src/Services/ServiceRouter/ExportService.php
Modify the webhook URL before the print-ready file notification is sent.
apply_filters('chamevo_export_file_ready_webhook', string $webhook_url, array $print_data): string
Modify the General settings options array.
apply_filters('chamevo_general_settings', array $options): array
Similar filters exist for other settings groups:
Filter Settings group chamevo_features_settingsFeatures (Uploads, Photos, Text, Products, QR) chamevo_woocommerce_settingsWooCommerce integration chamevo_export_settingsExport and cloud delivery chamevo_advanced_settingsAdvanced/troubleshooting chamevo_print_profile_settingsPrint profile options
Type: Filter
File: src/Settings/Settings.php
Modify the settings page block structure (add, remove, or reorder settings tabs and sections).
apply_filters('chamevo_settings_blocks', array $blocks): array
Type: Action
File: src/Admin/Woo/Product.php
Fires after a WooCommerce product with Chamevo data is duplicated.
do_action('chamevo_product_duplicated', WC_Product $duplicate, WC_Product $original, array $duplicated_fields)
Type: Filter
File: src/Services/ServiceRouter/ApiService.php
Override the Service Router API base URL. Default: https://sr.chamevo.com/api/.
apply_filters('chamevo_service_router_url', string $url): string
These global functions are available for use in themes and plugins:
Function Description is_chamevo_product($post_id)Returns true if the post has a Chamevo product assigned chamevo_has_content($post_id)Returns content IDs if the post has Chamevo data, false otherwise chamevo_get_option($key)Get a Chamevo settings option value