Skip to content

Listing_Status

Namespace: DMS\Listing_Status Obtained via: dms_get_status()

Represents a single listing status (e.g. Active, Sold, Sale Pending). Statuses are managed per inventory type and can have custom colors, labels, and automation actions attached.


Core

get_id(): int

Returns the status ID.

$id = $status->get_id();

exists(): bool

Returns true if the status was found.

if ( $status->exists() ) { ... }

get( string $name ): mixed

Returns a status property or setting value.

Direct properties: id, type_id, slug, name, color, order_id, is_required

echo esc_html( $status->get( 'name' ) );   // e.g. "Active"
echo esc_html( $status->get( 'slug' ) );   // e.g. "active"
echo esc_html( $status->get( 'color' ) );  // e.g. "#2ecc71"
echo $status->get( 'type_id' );

is_required(): bool

Returns true if this is a built-in status that cannot be deleted.

if ( $status->is_required() ) {
    // Do not offer a delete option
}

get_actions(): array

Returns the automation actions configured for this status (e.g. publish/unpublish the post on status change).

$actions = $status->get_actions();