Thursday, 21 October 2021

Change order Tabel column



 


<?php
add_action('load-edit.php', 'wco_load', 20);
function wco_load()
{
    $screen = get_current_screen();
    if (!isset($screen->post_type) || 'shop_order' != $screen->post_type) {
        return;
    }

    add_filter("manage_{$screen->id}_columns", 'wco_add_columns');
    add_action("manage_{$screen->post_type}_posts_custom_column", 'wco_column_cb_data', 10, 2);
}

function wco_add_columns($columns)
{
    $actions = $columns['order_actions'];
    $order_total = $columns['order_total'];
    $order_date = $columns['order_date'];

    unset($columns['order_date']);
    unset($columns['order_total']);
    unset($columns['order_actions']);

    $columns["order_store"] = __("Store");
    $columns['order_date'] = $order_date;
    $columns['order_total'] = $order_total;
    $columns['order_actions'] = $actions;
    return $columns;
}


function wco_column_cb_data($colname, $cptid)
{
    if ($colname == 'order_store') {
        $dob = get_post_meta($cptid, 'order_store', true);
        if (!empty($dob)) {
            $age = date('Y') - date('Y', strtotime($dob));
            echo $age;
        }
    }
}

Tuesday, 12 October 2021

Time zone list

 

Time zone list

This section lists the supported time zones together with their description.

NameDescriptionRelative to GMT
GMTGreenwich Mean TimeGMT
UTCUniversal Coordinated TimeGMT
ECTEuropean Central TimeGMT+1:00
EETEastern European TimeGMT+2:00
ART(Arabic) Egypt Standard TimeGMT+2:00
EATEastern African TimeGMT+3:00
METMiddle East TimeGMT+3:30
NETNear East TimeGMT+4:00
PLTPakistan Lahore TimeGMT+5:00
ISTIndia Standard TimeGMT+5:30
BSTBangladesh Standard TimeGMT+6:00
VSTVietnam Standard TimeGMT+7:00
CTTChina Taiwan TimeGMT+8:00
JSTJapan Standard TimeGMT+9:00
ACTAustralia Central TimeGMT+9:30
AETAustralia Eastern TimeGMT+10:00
SSTSolomon Standard TimeGMT+11:00
NSTNew Zealand Standard TimeGMT+12:00
MITMidway Islands TimeGMT-11:00
HSTHawaii Standard TimeGMT-10:00
ASTAlaska Standard TimeGMT-9:00
PSTPacific Standard TimeGMT-8:00
PNTPhoenix Standard TimeGMT-7:00
MSTMountain Standard TimeGMT-7:00
CSTCentral Standard TimeGMT-6:00
ESTEastern Standard TimeGMT-5:00
IETIndiana Eastern Standard TimeGMT-5:00
PRTPuerto Rico and US Virgin Islands TimeGMT-4:00
CNTCanada Newfoundland TimeGMT-3:30
AGTArgentina Standard TimeGMT-3:00
BETBrazil Eastern TimeGMT-3:00
CATCentral African TimeGMT-1:00

Change Set Default Timezone On Xampp Server

 

  1. Navigate to the php folder (normally in \xampp\php) and edit the php.ini file.
  2. Under the [Date] section copy and paste your time zone in this format: date.timezone=Atlantic/Faroe
  1. Navigate to the MySQL bin folder (normally in \xampp\mysql\bin) and edit the my.ini file.
  2. Copy and paste your time zone in this format: default-time-zone=Atlantic/Faroe
  1. Navigate to the apache configuration folder (normally in \xampp\apache\conf) and edit the httpd.conf file.
  2. Copy and paste your time zone in this format: SetEnv TZ Atlantic/Faroe