I’m trying to add css classes, so that each status (active, pending, canceled) has its own css class on the frontend. Please help.
function rcp_get_status_label( $status = '' ) {
static $labels = null;
// Array of status labels
if ( null === $labels ) {
$labels = array(
// General
'active' => __( 'Active', 'rcp'),
'inactive' => __( 'Inactive', 'rcp' ),
'pending' => __( 'Pending', 'rcp' ),
// Memberships
'cancelled' => __( 'Cancelled', 'rcp' ),
'expired' => __( 'Expired', 'rcp' ),
'free' => __( 'Free', 'rcp' ), // deprecated
// Payments
'abandoned' => __( 'Abandoned', 'rcp' ),
'complete' => __( 'Complete', 'rcp' ),
'failed' => __( 'Failed', 'rcp' ),
'refunded' => __( 'Refunded', 'rcp' ),
'new' => __( 'New', 'rcp' ),
'renewal' => __( 'Renewal', 'rcp' ),
'upgrade' => __( 'Upgrade', 'rcp' ),
'downgrade' => __( 'Downgrade', 'rcp' ),
// Discount Codes
'disabled' => __( 'Disabled', 'rcp' ),
);
}
<td data-th="<?php esc_attr_e( 'Status', 'rcp' ); ?>">
<?php rcp_print_membership_status( $membership->get_id() ); ?>
</td>