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
WordPress hooks and filters reference
Complete reference of WordPress action hooks and filters provided by the Chamevo plugin for customizing behavior.
Updated April 29, 20265 min read
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.
Frontend hooks
chamevo_designer_enabled
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
$enabled
bool
Whether the customizer is currently enabled for this post
$post_id
int
The WordPress post/product ID
Example: Disable the customizer for a specific product:
Modify or intercept customization data when a new order is placed. This is the central hook for all order types (WooCommerce, Shortcode, Gravity Forms).
The redirect URI is no longer stored user input. It is computed on every read and forced onto the chamevo_ae_dropbox_redirect_uri option, so the settings screen, the connect popup, and the cloud export handler always agree β including on installs that carry a stale value from Fancy Product Designer or a previous domain. The field renders read-only in Settings β Export β Cloud Storage.
Use this filter only when your admin origin differs from home_url() β a headless setup, or a site whose wp-admin is served from a different host.
add_filter('chamevo_dropbox_redirect_uri', function ($uri) {
return 'https://admin.example.com';
});
The value must be same-origin with wp-admin. The connect flow reads the ?code= parameter from the popup's location.href, which the browser only permits same-origin. A foreign host leaves the popup hanging without ever yielding an authorization code. Whatever you return must also be registered as a Redirect URI in the Dropbox App Console.
These dynamic filters route Chamevo's AI Tools β text-to-image generation, upscaling, and background removal β to your own AI provider instead of the hosted Chamevo service. {tool} is one of the canonical tool keys: text2image, upscale, or remove_background.
Resolve the provider configuration for a tool. Return a config whose endpoint is non-empty to put the tool in custom mode β Chamevo then calls your endpoint directly, bypassing the hosted service-router, the license header (X_API_TOKEN), and credit metering. This is the runtime alternative to the CHAMEVO_AI_{TOOL}_ENDPOINT / _KEY / _MODEL constants.
Short-circuit the direct provider HTTP call. Return a service-router-shaped array to fully bypass the built-in request β useful for async providers (create + poll) or provider SDKs. Returns null by default.
Set the headers sent to the custom provider. Defaults to Authorization: Bearer {api_key} when a key is set. The Chamevo license header is never sent in custom mode.
Normalize the provider response into the service-router shape so the AJAX handler can consume it: ['status' => 'success', 'data' => ['output' => $url]]. output may be a remote URL, an array of URLs, or a data:image/β¦;base64,β¦ URI.
Turns on dev-assets mode. In this mode, every Chamevo script and style gets a fresh version stamp (the request timestamp) on each page load. This includes the customizer's lazy-loaded cv-*.entry.js chunks. Browsers never serve a stale bundle while you test changes.
When the mode is off, built bundles use their file modification time as the version, and other assets use the plugin version. Production output is unchanged.
The filter runs after the constant check, so it can also turn the mode off when the constant is set.
Never enable dev-assets mode on a production site. Every page load then forces browsers to download every Chamevo script and style again.
Helper functions
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
chamevo_dev_assets_enabled()
Returns true when dev-assets mode is on (constant or chamevo_dev_assets filter)
chamevo_asset_version($file = null)
Returns the version string Chamevo uses for an enqueued asset: the request timestamp in dev-assets mode, otherwise the file's modification time, or the plugin version