Skip to content

Instantly share code, notes, and snippets.

View prikhi's full-sized avatar

Pavan Rikhi prikhi

View GitHub Profile
@prikhi
prikhi / wc-custom-purchased-column.php
Last active June 15, 2020 06:24 — forked from rynaldos-zz/wc-custom-purchased-column.php
[WooCommerce 3.0+] Re-instate the "Purchased items" column on orders page
<?php
/** Add a Purchased Column w/ Item Quantity, SKU, Name, & Meta to the Admin Orders Table **/
class ThemeWooCommerce
{
/* Add a `Purchased` Column to the Admin Orders Table */
public static function add_purchased_column_header($columns) {
$new_columns = array();
foreach ($columns as $key => $title) {
if ($key === 'billing_address') {
$new_columns['order_items'] = __('Purchased', 'woocommerce');
type FilterMsg
= UpdateTitleFilter String
| UpdateDescriptionFilter String
| UpdateTagFilter String
type Msg
= Filter FilterMsg
| DoSomethingElse