wogc/admin/manage_shop_order_column_data
Name: wogc/admin/manage_shop_order_column_data
Type: Action
Arguments: $post, $column_name
The filter can be used to render data for a custom created column on SuperAdmin Orders interface.
The following example render html for column called Products
add_action('wogc/admin/manage_shop_order_column_data', 'custom_wogc_admin_manage_shop_order_column_data', 10, 2);
function custom_wogc_admin_manage_shop_order_column_data( $post, $column_name )
{
if ( $column_name != 'products')
return;
$order = wc_get_order( $post->ID );
foreach( $order->get_items() as $key => $order_item )
{
switch_to_blog( $order_item->get_meta('blog_id') );
printf( '<b>%s</b>', esc_html( $order_item->get_name() ) );
restore_current_blog();
}
}
The code should be placed inside a php file on wp-content/mu-plugins folder.
Related Posts
WooCommerce Global Cart is...
By default, WooCommerce retains...
WooCommerce’s persistent cart feature...
Managing multiple WooCommerce shops within a WordPress Multisite environment can be challenging, especially when it comes to keeping product information consistent across all stores. The WooCommerce Product Synchronization feature in the WP Global Cart plugin addresses this challenge by enabling seamless synchronization of products across your network.
Name: woogc/sequential_order_number/format
Type: Filter
Arguments: (int) $order_number,...
Name: woogc/global_cart/sites
Type: Filter
Arguments: (array) $sites_ids
The...
Name: woogc/single_checkout/split_order/order_created
Type: Action
Arguments: $new_order
The `woogc/single_checkout/split_order/order_created` action...
The WordPress WooCommerce Global...
By default, on Product...