'integer', 'description' => __('Site-wide fallback FluentCart product ID used to preview elements in the Breakdance editor when no other product context resolves.', 'sparkcore-commerce'), 'sanitize_callback' => 'absint', 'default' => 0, 'show_in_rest' => false, ]); } /** * Reads the stored option and runs it through the public filter so other * code (a future admin UI, per-document overrides, tests) can override the * value without touching the option itself. */ public static function previewProductId(): int { $stored = function_exists('get_option') ? absint(get_option(self::OPTION, 0)) : 0; return (int) apply_filters('fcbd/editor_preview_product_id', $stored); } }