I want to Display custom woocomerce meta box in orders list

Solved it here is the answer add_action( ‘manage_shop_order_posts_custom_column’, ‘delivery_company_order_column_content’, 10, 2 ); function delivery_company_order_column_content( $column, $post_id ) { if ( $column === ‘delivery_company_order’ ) { $order = wc_get_order( $post_id ); $delivery_company = get_post_meta( $order->get_id(), ‘delivery_company’, true ); $delivery_company_name = get_the_title( $delivery_company ); echo $delivery_company_name; } } add_filter(‘manage_edit-shop_order_columns’, ‘delivery_company_order_column’); function delivery_company_order_column($columns) { $columns[‘delivery_company_order’] = ‘Delivery Company’; … Read more

Add a custom code with custom link after add to cart for every product

You need to add custom meta box such as product_ext_url for product post type. Then use hook below to add your code in single product page. add_action( ‘woocommerce_after_add_to_cart_button’, ‘your_function’ ); function your_function(){ echo get_post_meta( $product_id, ‘product_ext_url’ ); } In above function you will print external url of current product after add-to-cart button. // UPDATE To … Read more