• Resolved KelseyCurran

    (@kelseycurran)


    Hi! Really grateful for this plugin, but I would love to be able to see the products without clicking. I understand why you have it that way, but my customers are only buying one item at a time and I would love to be able to see it at a glance.

Viewing 1 replies (of 1 total)
  • Plugin Author pipdig

    (@pipdig)

    Hi @kelseycurran,

    That’s not possible via this particular plugin, however you can add this by copying the following code to your theme’s functions.php file. Please note 3 important things:

    1. Only do this if you’re comfortable editing PHP files and understand what this means. It can break your site otherwise.

    2. This requires PHP 7 or higher.

    3. This may stop working when WooCommerce 8 is release around August 2023.

    add_filter('manage_edit-shop_order_columns', function($columns) {
    	$new_array = array();
    	foreach ($columns as $key => $title) {
    		if ($key == 'billing_address') {
    			$new_array['order_items'] = __('Purchased', 'woocommerce');
    		}
    		$new_array[$key] = $title;
    	}
    	return $new_array;
    });
    add_action('manage_shop_order_posts_custom_column', function($column) {
    	if ($column == 'order_items') {
    		$order_id = get_the_ID();
    		$order = wc_get_order($order_id);
    		foreach ($order->get_items() as $item){
    			echo esc_html($item['name']).'<br />';
    		}
    	}
    }, 10, 2);
Viewing 1 replies (of 1 total)
  • The topic ‘Show products onload instead of click’ is closed to new replies.