i write a plugin to change date without changing .tpl files
and it work...
but finding array data arrays is very difficult in this method.
add_hook('ClientAreaPageProductsServices', 1, function ($templateVariables)
{
/*foreach ($templateVariables as $Variables_name) {
print_r($Variables_name);
}*/
$date = $templateVariables['services']['0']['nextduedate'] ;
$date2 = jdate( 'Y/m/d', strtotime( $date )) ;
$replacements = $templateVariables['services']['0'];
$convetred = array( "nextduedate" => $date2);
$templateVariables['services']['0'] = array_replace($replacements, $convetred);
return($templateVariables);
} );
can some one help me to use folowing code to replace date ?
how can i use getChild('') to get date value
for example getChild('nextduedate')
use WHMCS\View\Menu\Item as MenuItem;
@add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar)
{
if (!is_null($primaryNavbar->getChild('Support'))) {
$primaryNavbar->getChild('Support')
->addChild('sms_module', array(
'label' => 'sms_notification',
'uri' => 'index.php?m=sms_module',
'order' => '100',
));
}
});