Workload threshold filters define when propagation and machine-translation work runs synchronously versus asynchronously. Baseline defaults are used by the estimator and can be overridden per context.
What thresholds control
The plugin estimates workload from submitted field values or import queue metadata (propagation units, translation string units, and translatable character count). When any threshold is exceeded, work is deferred to background jobs via Action Scheduler (or WP-Cron as a fallback).
- Save thresholds (
polyfields_acf_options/save_sync_thresholds): Control whether machine translation during options save runs inline or is queued. Below thresholds: synchronous. Above thresholds: queued after the source save completes. - Import thresholds (
polyfields_acf_options/import_sync_thresholds): Control whether the import batch itself runs in background batches. They do not change first-use behavior fortranslateandtranslate_oncefields, which always queue translation jobs. For WP-CLI, imports below thresholds run synchronously (including machine translation); above thresholds use the queue-based import path.
See Field translation overview for the full sync vs async behavior matrix.
Baseline default filters
polyfields_acf_options/default_propagation_units(default150) — Max propagation work units allowed before switching to async.polyfields_acf_options/default_translation_units(default40) — Max translation string units allowed before switching to async.polyfields_acf_options/default_translation_chars(default20000) — Max total translatable character count allowed before switching to async.
Context-specific filters
Baseline values are passed into context-specific threshold filters:
polyfields_acf_options/save_sync_thresholds— Override threshold values used for regular options save requests.polyfields_acf_options/import_sync_thresholds— Override threshold values used for import processing.
Example
add_filter(
'polyfields_acf_options/default_translation_chars',
static function (): int {
return 35000;
}
);
See Polylang ACF options settings for preset workload profiles in the admin UI.