Automattic\WooCommerce\Internal\OrderReviews

Endpoint::queue_pending_rewrite_flush │ private │ WC 1.0

Queue the endpoint-specific soft flush for maybe_flush_pending_rewrite().

While WordPress is installing, update_option() the row but skips every cache update, so a persistent object cache keeps serving the previous value and the next request never sees the queued flush. Evict both places the option can be cached, mirroring WC_Post_Types::flush_rewrite_rules().

Метод класса: Endpoint{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// private - только в коде основоного (родительского) класса
$result = $this->queue_pending_rewrite_flush(): void;

Код Endpoint::queue_pending_rewrite_flush() WC 11.2.2

private function queue_pending_rewrite_flush(): void {
	update_option( 'woocommerce_review_order_flush_rewrite_pending', 'yes' );

	if ( wp_installing() ) {
		wp_cache_delete( 'woocommerce_review_order_flush_rewrite_pending', 'options' );
		wp_cache_delete( 'alloptions', 'options' );
	}
}