Automattic\WooCommerce\Internal\Email
EmailStyleSync::maybe_sync_on_option_update
Trigger sync when auto-sync option is enabled.
Метод класса: EmailStyleSync{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$EmailStyleSync = new EmailStyleSync(); $EmailStyleSync->maybe_sync_on_option_update( $old_value, $new_value, $option );
- $old_value(разное) (обязательный)
- The old option value.
- $new_value(разное) (обязательный)
- The new option value.
- $option(строка) (обязательный)
- The option name.
Код EmailStyleSync::maybe_sync_on_option_update() EmailStyleSync::maybe sync on option update WC 9.9.4
public function maybe_sync_on_option_update( $old_value, $new_value, $option ) { if ( 'yes' === $new_value && 'yes' !== $old_value ) { // Force sync regardless of current auto-sync setting since we know it's being enabled. $this->is_syncing = true; try { $this->update_email_colors(); } finally { $this->is_syncing = false; } } }