Automattic\WooCommerce\Admin\RemoteInboxNotifications
StoredStateSetupForProducts::run_on_transition_post_status()
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() StoredStateSetupForProducts::run on transition post status WC 7.7.0
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(); }