public/wordpress/wp-content/plugins/wp-courseware/includes/admin/tables/table-subscriptions.php
/**
	 * Display a Subscriptions Statuses Dropdown.
	 *
	 * @since 4.3.0
	 */
Display a Subscriptions Statuses Dropdown.
Display a Subscriptions Statuses Dropdown .
protected function subscription_statuses_dropdown() {
		if ( apply_filters( 'wpcw_subscriptions_disable_filter_by_status_dropdown', false ) ) {
			return;
		}
		$statuses = wpcw()->subscriptions->get_statuses();
		if ( empty( $statuses ) ) {
			return;
		}
		$current_order_status = ! empty( $_GET['sub_status'] ) ? wpcw_clean( $_GET['sub_status'] ) : '';
		$placeholder          = esc_html__( 'Any Status', 'wp-courseware' );
		printf( '<span class="wpcw-filter-wrapper">' );
		printf( '<select class="wpcw-select-field-filter" name="sub_status" placeholder="%s" data-placeholder="%s">', $placeholder, $placeholder );
		printf( '<option value="">%s</option>', $placeholder );
		foreach ( $statuses as $status => $status_label ) {
			$selected = selected( $current_order_status, $status, false );
			printf( '<option value="%s" %s>%s</option>', $status, $selected, $status_label );
		}
		printf( '</select>' );
		printf( '</span>' );
	}
protected function subscription_statuses_dropdown ( ) { if ( apply_filters ( 'wpcw_subscriptions_disable_filter_by_status_dropdown' , false ) ) { return ; } $ statuses = wpcw ( ) -> subscriptions -> get_statuses ( ) ; if ( empty ( $ statuses ) ) { return ; } $ current_order_status = ! empty ( $ _GET [ 'sub_status' ] ) ? wpcw_clean ( $ _GET [ 'sub_status' ] ) : '' ; $ placeholder = esc_html__ ( 'Any Status' , 'wp-courseware' ) ; printf ( '<span class="wpcw-filter-wrapper">' ) ; printf ( '<select class="wpcw-select-field-filter" name="sub_status" placeholder="%s" data-placeholder="%s">' , $ placeholder , $ placeholder ) ; printf ( '<option value="">%s</option>' , $ placeholder ) ; foreach ( $ statuses as $ status => $ status_label ) { $ selected = selected ( $ current_order_status , $ status , false ) ; printf ( '<option value="%s" %s>%s</option>' , $ status , $ selected , $ status_label ) ; } printf ( '</select>' ) ; printf ( '</span>' ) ; }
Display a Subscriptions Statuses Dropdown.
Display a Subscriptions Statuses Dropdown .
/**
		 * Filter: Disable filter by status dropdown.
		 *
		 * @since 4.3.0
		 *
		 * @param bool $disable Whether to disable the status drop-down. Default false.
		 */