backend_order

Adds custom content to order-viewing page in backend.

Shop-Script

Input (passed by reference)

$params array Order data.
… your plugin code …

Output

{$backend_order.%plugin_id%.title_suffix}

Custom content displayed after order id at page top.

{$backend_order.%plugin_id%.action_button}

Custom element displayed at the end of order action button list.

{$backend_order.%plugin_id%.action_link}

Custom elements displayed under link “Edit order” in right sidebar.

{$backend_order.%plugin_id%.info_section}

Extra informational block displayed under customers' contact details.

Shop-Script

Plugin code example

PHP

public function backendOrder($params)
{
    $order_data = shopMyPluginHelper::getByOrderId($params['id']);
    return array(
        'title_suffix'  => $order_data['suffix'],
        'action_button' => '<a href="" class="button blue">'._wp('My action').'</a>',
        'action_link'   => '<a href="">'._wp('My action').'</a>',
        'info_section'  => '<p>'.$order_data['info'].'</p>',
    );
}