Regenerate_Order_Attendees::add_single_order_action( array $actions )

Register the custom action to the list of single order edit actions.


Parameters

$actions

(array) (Required) List of order actions.


Top ↑

Return

(array) List of order actions with new action registered.


Top ↑

Source

File: src/Tribe/Commerce/WooCommerce/Regenerate_Order_Attendees.php

	public function add_single_order_action( array $actions ) {

		$order_id = (int) tribe_get_request_var( 'post' );
		$order    = wc_get_order( $order_id );

		// Bail if the order is empty.
		if ( empty( $order ) ) {
			return $actions;
		}

		if ( ! $this->order_has_tickets( $order ) ) {
			return $actions;
		}

		$actions[ $this->action_slug ] = __( 'Regenerate Attendees', 'event-tickets-plus' );

		return $actions;
	}

Top ↑

Changelog

Changelog
Version Description
5.2.7 Introduced.