id, 'Alipay Trade No.', true ); if( !empty( $trade_no ) ){ $new_row['alipay_trade_no'] = array( 'label' => __( 'Alipay Trade No.:', 'alipay' ), 'value' => $trade_no ); // Insert $new_row after shipping field $total_rows = array_merge( array_splice( $total_rows,0,2), $new_row, $total_rows ); } return $total_rows; } add_filter( 'woocommerce_get_order_item_totals', 'wc_alipay_display_order_meta_for_customer', 10, 2 ); function wc_alipay_plugin_edit_link( $links ){ return array_merge( array( 'settings' => ''.__( 'Settings', 'alipay' ).'' ), $links ); } ?>