Automattic\WooCommerce\Internal\ProductAttributesLookup

CLIRunner::regenerate()publicWC 1.0

Regenerate the product attributes lookup table immediately, without using scheduled tasks.

OPTIONS

[--force]
Don't prompt for confirmation if the product attributes lookup table isn't empty.
[--from-scratch]
Start table regeneration from scratch even if a regeneration is already in progress.
[--disable-db-optimization]
Don't use optimized database access even if products are stored as custom post types.
[--batch-size=<size>]
How many products to process in each iteration of the loop.
--- default: 10
---

EXAMPLES

wp wc palt regenerate --force --from-scratch --batch-size=20

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

Хуков нет.

Возвращает

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

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

$CLIRunner = new CLIRunner();
$CLIRunner->regenerate( $args, $assoc_args );
$args(массив)
Positional arguments passed to the command.
По умолчанию: array()
$assoc_args(массив)
Associative arguments (options) passed to the command.
По умолчанию: array()

Код CLIRunner::regenerate() WC 9.7.1

public function regenerate( array $args = array(), array $assoc_args = array() ) {
	return $this->invoke( 'regenerate_core', $args, $assoc_args );
}