Automattic\WooCommerce\Blocks

BlockPatterns::schedule_on_option_update()publicWC 1.0

Update the patterns content when the store description is changed.

Method of the class: BlockPatterns{}

No Hooks.

Return

null. Nothing (null).

Usage

$BlockPatterns = new BlockPatterns();
$BlockPatterns->schedule_on_option_update( $option, $value );
$option(string) (required)
The option name.
$value(string) (required)
The option value.

BlockPatterns::schedule_on_option_update() code WC 8.9.0

public function schedule_on_option_update( $option, $value ) {
	$last_business_description = get_option( 'last_business_description_with_ai_content_generated' );

	if ( $last_business_description === $value ) {
		return;
	}

	$this->schedule_patterns_content_update( $value );
}