hook_store_status

Function hook_store_status() in uc_store.module:

<?php
  hook_store_status
()
?>


Description:

This hook is used to add items to the store status table on the main store administration screen. Each item gets a row in the table that consists of a status icon, title, and description. These items should be used to give special instructions, notifications, or indicators for components of the cart enabled by the modules. At a glance, a store owner should be able to look here and see if a critical component of your module is not functioning properly.

For example, if the catalog module is installed and it cannot find the catalog taxonomy vocabulary, it will show an error message here to alert the store administrator.

Store status items are defined in an array with the following keys:

  • status - ok, warning, or error depending on the message.
  • title - the title of the status message or module that defines it.
  • desc - the description; can be any message, including links to pages and forms that deal with the issue being reported.
Return value:

An array of store status arrays as defined above.


Example:

<?php
// From uc_credit.module:
function uc_credit_store_status() {
  if (
$key = uc_credit_encryption_key()) {
   
$statuses[] = array(
     
'status' => 'ok',
     
'title' => t('Credit card encryption'),
     
'desc' => t('Credit card data in the database is currently being encrypted.'),
    );
  }
  return
$statuses;
}
?>