Automattic\WooCommerce\Admin\RemoteInboxNotifications

SpecRunner::get_url()private staticWC 1.0

Get the URL for an action.

Method of the class: SpecRunner{}

No Hooks.

Return

String. The URL for the action.

Usage

$result = SpecRunner::get_url( $action );
$action(object) (required)
The action.

SpecRunner::get_url() code WC 8.7.0

private static function get_url( $action ) {
	if ( ! isset( $action->url ) ) {
		return '';
	}

	if ( isset( $action->url_is_admin_query ) && $action->url_is_admin_query ) {
		if ( strpos( $action->url, '&path' ) === 0 ) {
			return wc_admin_url( $action->url );
		}
		return admin_url( $action->url );
	}

	return $action->url;
}