prefix . 'usces_order'; // phpcs:ignore if ( defined( 'WCEX_AUTO_DELIVERY' ) && version_compare( WCEX_AUTO_DELIVERY_VERSION, '1.4.0', '>' ) ) { $arr_column = array( __( 'ID', 'usces' ) => 'ID', __( 'Order number', 'usces' ) => 'deco_id', __( 'Regular ID', 'autodelivery' ) => 'reg_id', __( 'date', 'usces' ) => 'date', __( 'membership number', 'usces' ) => 'mem_id', __( 'name', 'usces' ) => 'name', __( 'Region', 'usces' ) => 'pref', __( 'shipping option', 'usces' ) => 'delivery_method', __( 'Amount', 'usces' ) . '(' . __( usces_crcode( 'return' ), 'usces' ) . ')' => 'total_price', __( 'payment method', 'usces' ) => 'payment_name', __( 'transfer statement', 'usces' ) => 'receipt_status', __( 'Processing', 'usces' ) => 'order_status', __( 'shpping date', 'usces' ) => 'order_modified', ); } else { $arr_column = array( __( 'ID', 'usces' ) => 'ID', __( 'Order number', 'usces' ) => 'deco_id', __( 'date', 'usces' ) => 'date', __( 'membership number', 'usces' ) => 'mem_id', __( 'name', 'usces' ) => 'name', __( 'Region', 'usces' ) => 'pref', __( 'shipping option', 'usces' ) => 'delivery_method', __( 'Amount', 'usces' ) . '(' . __( usces_crcode( 'return' ), 'usces' ) . ')' => 'total_price', __( 'payment method', 'usces' ) => 'payment_name', __( 'transfer statement', 'usces' ) => 'receipt_status', __( 'Processing', 'usces' ) => 'order_status', apply_filters( 'usces_filter_admin_modified_label', __( 'shpping date', 'usces' ) ) => 'order_modified', ); } $arr_column = apply_filters( 'usces_filter_order_list_column', $arr_column ); // phpcs:disable $DT = new dataList( $tableName, $arr_column ); $res = $DT->MakeTable(); $arr_search = $DT->GetSearchs(); $management_status = apply_filters( 'usces_filter_management_status', get_option( 'usces_management_status' ) ); $arr_header = $DT->GetListheaders(); $dataTableNavigation = $DT->GetDataTableNavigation(); $rows = $DT->rows; $status = $DT->get_action_status(); $message = $DT->get_action_message(); $status = apply_filters( 'usces_order_list_action_status', $status ); $message = apply_filters( 'usces_order_list_action_message', $message ); // phpcs:enable $usces_admin_path = ''; $admin_perse = explode( '/', $_SERVER['REQUEST_URI'] ); // phpcs:ignore $apct = count( $admin_perse ) - 1; for ( $ap = 0; $ap < $apct; $ap++ ) { $usces_admin_path .= $admin_perse[ $ap ] . '/'; } $startdate = ( ! empty( $DT->startdate ) ) ? $DT->startdate : ''; // phpcs:ignore $enddate = ( ! empty( $DT->enddate ) ) ? $DT->enddate : ''; // phpcs:ignore $period_specified_index = $DT->get_period_specified_index(); // phpcs:ignore $pref = array(); $target_market = $this->options['system']['target_market']; foreach ( (array) $target_market as $country ) { $prefs = get_usces_states( $country ); if ( is_array( $prefs ) && 0 < count( $prefs ) ) { $pos = strpos( $prefs[0], '--' ); if ( false !== $pos ) { array_shift( $prefs ); } foreach ( (array) $prefs as $state ) { $pref[] = $state; } } } $payment_name = array(); $payments = usces_get_system_option( 'usces_payment_method', 'sort' ); foreach ( (array) $payments as $id => $payment ) { // phpcs:ignore $payment_name[ $id ] = $payment['name']; } foreach ( (array) $management_status as $key => $value ) { if ( 'noreceipt' == $key || 'receipted' == $key || 'pending' == $key ) { $receipt_status[ $key ] = $value; } else { $order_status[ $key ] = $value; } } $order_status['new'] = __( 'new order', 'usces' ); $curent_url = urlencode( esc_url( USCES_ADMIN_URL . '?' . $_SERVER['QUERY_STRING'] ) ); // phpcs:ignore $csod_meta = usces_has_custom_field_meta( 'order' ); $cscs_meta = usces_has_custom_field_meta( 'customer' ); $csde_meta = usces_has_custom_field_meta( 'delivery' ); $usces_opt_order = get_option( 'usces_opt_order' ); $chk_pro = ( isset( $usces_opt_order['chk_pro'] ) ) ? $usces_opt_order['chk_pro'] : array(); $chk_ord = ( isset( $usces_opt_order['chk_ord'] ) ) ? $usces_opt_order['chk_ord'] : array(); $applyform = usces_get_apply_addressform( $this->options['system']['addressform'] ); $settlement_backup = ( isset( $this->options['system']['settlement_backup'] ) ) ? $this->options['system']['settlement_backup'] : 0; $settlement_notice = get_option( 'usces_settlement_notice' ); $order_list_delete_link = ( isset( $this->options['system']['order_list_delete_link'] ) ) ? $this->options['system']['order_list_delete_link'] : 0; ?>