Service
in package
A single service.
Retrieves data for a single service, including adjustments, roles, rate types, file uploads, briefs, dependencies, and other information.
Tags
Table of Contents
Properties
- $adjustments : array<string|int, mixed>
- An array of associated adjustment post IDs.
- $assigned_team_member : int
- Assigned team member.
- $brief_type : array<string|int, mixed>
- The post IDs for all brief types required with this service.
- $dependencies_string : string
- Formatted string of dependency IDs.
- $dependency : array<string|int, mixed>
- Dependencies.
- $file_required : bool
- Whether a file upload is required.
- $file_uploads : array<string|int, mixed>
- An array of associated file upload post IDs.
- $hide : bool
- Whether to hide the service from the booking form.
- $ID : int
- The post ID.
- $manuscript_required : bool
- Whether a file upload is required.
- $order : int
- The order to display the service.
- $rate_type : int
- The post ID of the associated rate type.
- $rate_value : float
- The value of the service fee.
- $service_type : string
- Service type.
- $slug : string
- The post name.
- $team_member_percentage : int
- The team member percentage in whole numbers.
- $team_member_role : int
- The post ID of the associated team member role.
- $title : string
- The post title.
- $visible : string
- Whether the service is visible.
Methods
- __construct() : mixed
- Constructor method.
- exists() : mixed
- Checks whether a post exists.
- validate() : mixed
- Validates the service.
Properties
$adjustments
An array of associated adjustment post IDs.
public
array<string|int, mixed>
$adjustments
$assigned_team_member
Assigned team member.
public
int
$assigned_team_member
Optional. The permanently assigned team member.
$brief_type
The post IDs for all brief types required with this service.
public
array<string|int, mixed>
$brief_type
$dependencies_string
Formatted string of dependency IDs.
public
string
$dependencies_string
$dependency
Dependencies.
public
array<string|int, mixed>
$dependency
The post IDs of services that should be booked before this service.
$file_required
Whether a file upload is required.
public
bool
$file_required
$file_uploads
An array of associated file upload post IDs.
public
array<string|int, mixed>
$file_uploads
$hide
Whether to hide the service from the booking form.
public
bool
$hide
$ID
The post ID.
public
int
$ID
$manuscript_required
Whether a file upload is required.
public
bool
$manuscript_required
Tags
$order
The order to display the service.
public
int
$order
Optional. Higher numbers are shown first.
$rate_type
The post ID of the associated rate type.
public
int
$rate_type
$rate_value
The value of the service fee.
public
float
$rate_value
$service_type
Service type.
public
string
$service_type
$slug
The post name.
public
string
$slug
$team_member_percentage
The team member percentage in whole numbers.
public
int
$team_member_percentage
$team_member_role
The post ID of the associated team member role.
public
int
$team_member_role
$title
The post title.
public
string
$title
$visible
Whether the service is visible.
public
string
$visible
'Visible' if visible.
Methods
__construct()
Constructor method.
public
__construct(int $post_id) : mixed
Parameters
- $post_id : int
-
The ID of the service post.
Tags
exists()
Checks whether a post exists.
public
exists(int $post_id) : mixed
Parameters
- $post_id : int
-
The ID of the service post.
Tags
validate()
Validates the service.
public
validate() : mixed