core = $core; add_action( 'woocommerce_checkout_after_order_review', array( $this, 'extend_checkout_page_form' ) ); add_action( 'woocommerce_after_checkout_form', array( $this, 'extend_checkout_page_bottom' ) ); } /** * Get additional HTML code for checkout form. */ public function extend_checkout_page_form() { echo ''; } /** * Extend_checkout_page_bottom. * * Check and embed code for modal if needed on checkout page. */ public function extend_checkout_page_bottom() { $config = $this->core->get_config_for_currency(); $config->access_mode_to_strict(); if ( $config->get_p24_payinshop() ) { $my_account_link = get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ); echo ''; $display_terms = $config->get_p24_acceptinshop(); self::echo_modal_html( $display_terms ); } } /** * Get HTML code for modal * * @param bool $need_terms If checkbox to show terms is needed. Default to false. * * @return string */ public static function get_modal_html( $need_terms = false ) { $terms = $need_terms ? '1' : '0'; $translation_element = self::get_translation_element(); return <<