Automattic\WooCommerce\Blocks\Patterns
AIPatterns::schedule_patterns_content_update
Update the patterns content when the store description is changed.
Method of the class: AIPatterns{}
No Hooks.
Returns
null
. Nothing (null).
Usage
$AIPatterns = new AIPatterns(); $AIPatterns->schedule_patterns_content_update( $business_description );
- $business_description(string) (required)
- The business description.
AIPatterns::schedule_patterns_content_update() AIPatterns::schedule patterns content update code WC 9.8.5
public function schedule_patterns_content_update( $business_description ) { if ( ! class_exists( 'WooCommerce' ) ) { return; } $action_scheduler = WP_PLUGIN_DIR . '/woocommerce/packages/action-scheduler/action-scheduler.php'; if ( ! file_exists( $action_scheduler ) ) { return; } require_once $action_scheduler; as_schedule_single_action( time(), 'woocommerce_update_patterns_content', array( $business_description ) ); }