WooCommerce Code Reference

StoredStateSetupForProducts
in package

Handles stored state setup for products.

Table of Contents

ASYNC_RUN_REMOTE_NOTIFICATIONS_ACTION_NAME  = 'woocommerce_admin/stored_state_setup_for_products/async/run_remote_notifications'
admin_init()  : mixed
Initialize the class via the admin_init hook.
init()  : mixed
Initialize the class via the init hook.
init_stored_state()  : object
Set initial stored state values.
run_on_product_importer()  : mixed
Runs on product importer steps.
run_on_transition_post_status()  : mixed
Runs when a post status transitions, but we're only interested if it is a product being published.
run_remote_notifications()  : mixed
Run the remote notifications engine. This is triggered by action-scheduler after a product is added. It also cleans up from setting the product count increment.
are_there_products()  : bool
Are there products query.
update_stored_state_and_possibly_run_remote_notifications()  : mixed
Enqueues an async action (using action-scheduler) to run remote notifications.

Constants

Methods

run_on_transition_post_status()

Runs when a post status transitions, but we're only interested if it is a product being published.

public static run_on_transition_post_status(string $new_status, string $old_status, Post $post) : mixed
Parameters
$new_status : string

The new status.

$old_status : string

The old status.

$post : Post

The post.

Return values
mixed

run_remote_notifications()

Run the remote notifications engine. This is triggered by action-scheduler after a product is added. It also cleans up from setting the product count increment.

public static run_remote_notifications() : mixed
Return values
mixed