ID) && 'product' === get_post_type($post->ID)) { $prod = wc_get_product($post->ID); return $prod instanceof WC_Product ? $prod : null; } return null; } /** * Render placeholder when product context is missing. * * @return void */ protected function render_missing_product_notice(): void { if (!\Elementor\Plugin::$instance->editor->is_edit_mode()) { return; } echo '