' . esc_html__('Your workspace, your choice', 'orderworth') . '
' . esc_html__('Show or hide Pro preview navigation and contextual suggestions for your WordPress account on this store. Free tools remain available. Explore Pro is always accessible; purchased Pro tools stay visible.', 'orderworth') . '
';
OWWC_Pro_Journey::preference_form($hidden ? 'restore' : 'hide', '', $hidden ? __('Restore Pro previews', 'orderworth') : __('Hide Pro previews', 'orderworth'));
echo '';
}
public static function main_action(string $task, bool $primary = true): void {
$action = OWWC_Pro_Journey::action($task);
echo '' . esc_html($action['label']) . '';
}
public static function continuation(string $task): void {
if (OWWC_Pro_Journey::access_state() === 'active') { return; }
echo '
' . esc_html__('Pick up where you left off', 'orderworth') . '
';
OWWC_Pro_Journey::form($task, __('Continue this task with Pro', 'orderworth'));
echo '
';
}
public static function expenses(): void { self::render('expenses'); }
public static function insights(): void { self::render('insights'); }
public static function schedules(): void { self::render('schedules'); }
private static function content(): array {
return [
'expenses'=>[
'title'=>__('Give each method its own expense assumptions.', 'orderworth'),
'benefit'=>__('Save separate payment and shipping rules, then reuse them when calculating order estimates. Keep your global defaults for methods without a rule.', 'orderworth'),
'free'=>__('Free already includes global expense defaults and individual order adjustments.', 'orderworth'),
'caption'=>__('Actual Pro expense-rule settings with fictional methods and amounts. These are examples, not your store’s fees.', 'orderworth'),
'alt'=>__('OrderWorth Pro expense-rule settings showing separate payment-method fees and shipping-method expense assumptions.', 'orderworth'),
'steps'=>[
[__('Choose a store method', 'orderworth'), __('Select a payment or shipping method already configured in WooCommerce.', 'orderworth')],
[__('Enter your own assumptions', 'orderworth'), __('Set a percentage and fixed payment expense, or a shipping expense. Check each value against your own records.', 'orderworth')],
[__('Review and save the rules', 'orderworth'), __('Confirm your choices before saving. Existing order snapshots stay unchanged; unmatched methods use global defaults.', 'orderworth')],
],
'note'=>__('Rules estimate expenses from values you provide. They do not connect to a gateway or carrier, recover money or guarantee savings. Orders with multiple shipping methods can require individual review.', 'orderworth'),
],
'insights'=>[
'title'=>__('Understand what changed between periods.', 'orderworth'),
'benefit'=>__('Compare completed periods and inspect product allocations to understand the costs and orders behind an estimated profit change.', 'orderworth'),
'free'=>__('Free already includes recent and historical order-profit reports and individual order review.', 'orderworth'),
'caption'=>__('Actual Pro period analysis using fictional orders and amounts. This is example data, not a forecast or your store’s performance.', 'orderworth'),
'alt'=>__('OrderWorth Pro period analysis showing estimated profit comparisons, cost coverage and product allocations for fictional orders.', 'orderworth'),
'steps'=>[
[__('Choose completed periods', 'orderworth'), __('Select the current and comparison dates you want to understand.', 'orderworth')],
[__('Run and review the report', 'orderworth'), __('Check included orders, missing costs and exclusions before interpreting the totals.', 'orderworth')],
[__('Inspect the differences', 'orderworth'), __('Read period changes and product allocations alongside the supplied cost basis.', 'orderworth')],
],
'note'=>__('Both editions use the same calculation and refund checks. Missing costs remain visible and can withhold profit comparisons. Allocations are estimates; overhead and advertising are excluded.', 'orderworth'),
],
'schedules'=>[
'title'=>__('Have recurring report packs prepared for you.', 'orderworth'),
'benefit'=>__('Reuse your chosen filters for future completed calendar periods, then check report history instead of rebuilding each report manually.', 'orderworth'),
'free'=>__('Free already includes manual reports and continuation for larger date ranges.', 'orderworth'),
'caption'=>__('Actual Pro schedule settings with fictional example configuration. Viewing this screenshot creates no schedule and sends no email.', 'orderworth'),
'alt'=>__('OrderWorth Pro scheduled-report setup showing recurrence, saved filters and optional email controls.', 'orderworth'),
'steps'=>[
[__('Choose a recurring period', 'orderworth'), __('Select the future closed calendar weeks or months you want reported.', 'orderworth')],
[__('Review filters and delivery', 'orderworth'), __('Choose saved filters and optional notifications. Email stays off unless you explicitly enable it.', 'orderworth')],
[__('Save an enabled schedule', 'orderworth'), __('Nothing starts until you save. Return to report history for completion, failures and available report packs.', 'orderworth')],
],
'note'=>__('WordPress cron or your host’s scheduler must run; collection can be late and missed periods are not backfilled. Opening this preview or activating Pro does not enable a schedule.', 'orderworth'),
],
];
}
private static function render(string $task): void {
OWWC_Admin::authorize();
$item = self::content()[$task];
$image = plugins_url('assets/pro-previews/' . $task . '.png', OWWC_FILE);
echo '
' . esc_html($active ? __('Set up this workflow', 'orderworth') : __('From purchase to your first setup', 'orderworth')) . '
' . esc_html($active ? __('Pro is active. Review each step when you are ready:', 'orderworth') : __('Install Pro alongside Free and activate your licence, then:', 'orderworth')) . '
' . esc_html__('These invented values show how rules differ from one global default. They are not provider rates, measured savings or recommendations for your store. Individual order adjustments remain available in Free.', 'orderworth') . '
';
}
public static function settings_card(): void {
if (OWWC_Pro_Journey::access_state() === 'active' || !self::visible() || in_array('expenses', OWWC_Experience::state()['dismissed'], true)) { return; }
echo '
' . esc_html__('PRO', 'orderworth') . '
' . esc_html__('Different costs for different payment and shipping methods?', 'orderworth') . '
' . esc_html__('With Pro, save separate expense rules for each method and reuse them when calculating order estimates.', 'orderworth') . '