php - Hyperlink not displaying correctly -
i have table column "profile" needs output hyperlink, profile link of customer bought product.
updated
it's "user_link" in question, here's how now:
$new_row->id = $order->get_order_number(); $new_row->order_number = $order->get_order_number(); $new_row->customer = $customer_details; $new_row->products = $products_html; $new_row->total = $total_text; $new_row->status = $shipped; $new_row->user_link = print '<p><a class="author-link" href="'. $order->user_link .'">'. __( 'click here view user profile' ) . '</a><p>'; $new_row->order_date = date_i18n( wc_date_format(), strtotime( $order->order_date ) ) . '<br /><strong>' . ucfirst( $order->get_status() ) . '</strong>'; $new_row->row_actions = $row_actions; $new_row->action_after = $this->order_details_template( $_order ) . $this->order_note_template( $order->get_order_number() ) . $this->tracking_number_template( $order->get_order_number(), get_current_user_id() ); do_action( 'wcv_orders_add_new_row', $new_row ); $rows[] = $new_row;
table columns:
public function table_columns( ) { $columns = apply_filters( 'wcv_order_table_columns', array( 'id' => __( 'id', 'wcvendors-pro' ), 'order_number' => __( 'purchase id', 'wcvendors-pro' ), 'customer' => __( 'customer', 'wcvendors-pro' ), 'products' => __( 'product)', 'wcvendors-pro' ), 'total' => __( 'total', 'wcvendors-pro' ), 'order_date' => __( 'sale date', 'wcvendors-pro' ), 'user_link' => __( 'profile', 'wcvendors-pro'), ) );
what tried: in $new_row->user_link
tried adding print
:
$new_row->user_link = print '<p><a class="author-link" href="'. $order->user_link .'">'. __( 'click here view user profile' ) . '</a><p>';
change this:
$new_row->user_link = print '<p><a class="author-link" href="'. $order->user_link .'">'. __( 'click here view user profile' ) . '</a><p>';
to:
print('<p><a class="author-link" href="'. $order->user_link .'">click here view user profile</a><p>');
Comments
Post a Comment