PHP 8.2.31
Preview: TaskTraits.php Size: 971 B
/home/nshryvcy/himaltourism.com/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskTraits.php

<?php
/**
 * Task and TaskList Traits
 */

namespace Automattic\WooCommerce\Admin\Features\OnboardingTasks;

defined( 'ABSPATH' ) || exit;

/**
 * TaskTraits class.
 */
trait TaskTraits {
	/**
	 * Record a tracks event with the prefixed event name.
	 *
	 * @param string $event_name Event name.
	 * @param array  $args Array of tracks arguments.
	 * @return string Prefixed event name.
	 */
	public function record_tracks_event( $event_name, $args = array() ) {
		if ( ! $this->get_list_id() ) {
			return;
		}

		$prefixed_event_name = $this->prefix_event( $event_name );

		wc_admin_record_tracks_event(
			$prefixed_event_name,
			$args
		);

		return $prefixed_event_name;
	}

	/**
	 * Get the task list ID.
	 *
	 * @return string
	 */
	public function get_list_id() {
		$namespaced_class = get_class( $this );
		return is_subclass_of( $namespaced_class, 'Automattic\WooCommerce\Admin\Features\OnboardingTasks\Task' )
			? $this->get_parent_id()
			: $this->id;
	}
}

Directory Contents

Dirs: 1 × Files: 8

Name Size Perms Modified Actions
Tasks DIR
- drwxr-xr-x 2026-03-03 06:10:19
Edit Download
2.67 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
2.50 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.08 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
11.94 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
9.11 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
11.08 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
2.30 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
971 B lrw-r--r-- 2026-03-03 06:10:19
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).