クラス
CartErrorPage
ソース ソース
ファイル: src/Views/CartErrorPage/CartErrorPage.php
class CartErrorPage { /** * Returns error page HTML for when checkout fails * * @author Evan D Shaw <evandanielshaw@gmail.com> * @param string $html * @param string $errorcode * @param string $errormessage * @return string */ public function getErrorPageHtml($html, $errorcode, $errormessage) { ob_start(); ?> <style> .error_page_message > p { margin-top: 0.4rem; margin-left: 0.4rem; } .error_page_message .reasonCode { font-weight: 700; } </style> <div class="error_page_message"> <h4><?php _e('The following errors occured:', 'wcex_linepay'); ?></h4> <p><span class="reasonCode">- <?php echo esc_html($errorcode); ?></span>: <?php echo esc_html($errormessage); ?></p> </div> <?php $ehtml = ob_get_contents(); ob_end_clean(); $html .= $ehtml; return $html; } }
- getErrorPageHtml — Returns error page HTML for when checkout fails