Automattic / Automattic/lightweight-term-count-update

Consider edge cases around wp_defer_term_counting()

Open
#4 1 comment 0 reactions 1 assignee Claimed by @david-binda View on GitHub
Dominant language
PHP
Stars
34
Forks
9
PR merge metrics
No merged PRs in 30d

Description

From #2 ([direct link to comment](https://github.com/Automattic/lightweight-term-count-update/pull/2#discussion_r108465245)):

> I like the idea and it seems to be working fine. I'm just not sure whether we should not check whether the counting is still deferred right before running our SQL queries. While checking whether wp_defer_term_counting() is still returning true might be a quick solution, it does not seem to be bulletproof.
>
> We could perhaps hook the edited_term_taxonomy or edit_term_taxonomy actions and check whether they were called for the term and taxonomy we are currently updating before running our updates.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.