backend_customer

Adds extra content to customer-viewing page in backend.

Shop-Script

Input (passed by reference)

$customer array Customer data.
… your plugin code …

Output

{$backend_customer.info_section}
HTML code for adding extra content to the page bottom.
{$backend_customer.name_suffix}
HTML code for adding extra content to the right of the customer name.
{$backend_customer.header}
HTML code for adding extra content above customer's contact data.
{$backend_customer.action_link}
HTML code for adding extra content next to customer editing and deletion links.
Shop-Script

Plugin code example

PHP

public function backendCustomer($customer)
{
    $customer_data = shopMyPluginHelper::getByCustomerId($customer['contact_id']);
    return array(
        'name_suffix'  => $customer_data['suffix'],
        'action_link'  => '<a href="" class="myplugin-someaction">'._wp('some action name').'</a>',
        'header'       => '<h2>'._wp('My custom header').'</h2><p>'.$customer_data['info'].'</p>',
        'info_section' => '<p>'.$customer_data['extra'].'</p>',
    );
}