woocommerce_hpos_enable_sync_on_read

FILTER woocommerce\src\Internal\DataStores\Orders\OrdersTableDataStore.php (ligne 1365) github
Allow opportunity to disable sync on read, while keeping sync on write enabled. This adds another step as a large shop progresses from full sync to no sync with HPOS authoritative. This filter is only executed if data sync is enabled from settings in the first place as it's meant to be a step between full sync -> no sync, rather than be a control for enabling just the sync on read. Sync on read without sync on write is problematic as any update will reset on the next read, but sync on write without sync on read is fine.

Paramètres

Entrée :
$data_sync_enabled
Sortie :
@param bool $read_on_sync_enabled Whether to sync on read.

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_hpos_enable_sync_on_read'
add_filter('woocommerce_hpos_enable_sync_on_read', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($data_sync_enabled) {
    // Modifier la valeur
    return $data_sync_enabled;
}

Actualités

Chargement des actualités...