Automattic\WooCommerce\Admin\RemoteInboxNotifications

StoredStateSetupForProducts::run_on_transition_post_status()public staticWC 1.0

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

{} Это метод класса: StoredStateSetupForProducts{}

Хуков нет.

Возвращает

null. Ничего.

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

$result = StoredStateSetupForProducts::run_on_transition_post_status( $new_status, $old_status, $post );
$new_status(строка) (обязательный)
The new status.
$old_status(строка) (обязательный)
The old status.
$post(Post) (обязательный)
The post.

Код StoredStateSetupForProducts::run_on_transition_post_status() WC 6.9.4

public static function run_on_transition_post_status( $new_status, $old_status, $post ) {
	if (
		'product' !== $post->post_type ||
		'publish' !== $new_status
	) {
		return;
	}

	self::update_stored_state_and_possibly_run_remote_notifications();
}