Automattic\WooCommerce\Blocks\Assets
Api::update_script_data_cache()
Store all cached script data in the transient cache.
Метод класса: Api{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Api = new Api(); $Api->update_script_data_cache();
Код Api::update_script_data_cache() Api::update script data cache WC 9.8.5
public function update_script_data_cache() { if ( is_null( $this->script_data ) || $this->disable_cache ) { return; } if ( ! $this->script_data_modified ) { return; } set_transient( $this->script_data_transient_key, wp_json_encode( array( 'script_data' => $this->script_data, 'version' => $this->wc_version, 'hash' => $this->script_data_hash, ) ), DAY_IN_SECONDS * 30 ); }