Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_hook('ClientAreaProductDetailsOutput', 1, function($service) {
- if (!empty($service['service']->cancellationRequests['0']['reason'])) {
- $cancellationReason = htmlspecialchars ($service['service']->cancellationRequests['0']['reason'], ENT_QUOTES);
- return "
- <script>
- var cancellationReason = new DOMParser().parseFromString('{$cancellationReason}', 'text/html');
- jQuery('#alertPendingCancellation').append(`<br />Reason: \${cancellationReason.documentElement.textContent}`);
- </script>
- ";
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement