<commit_before><?php

class WC_Gateway_Checkout_Com_Alternative_Payments_Poli extends WC_Gateway_Checkout_Com_Alternative_Payments {

    public function __construct()
    {
        $this->id = 'wc_checkout_com_alternative_payments_poli';
        $this->method_title = __("Checkout.com", 'wc_checkout_com');
        $this->method_description = __("The Checkout.com extension allows shop owners to process online payments through the <a href=\"https://www.checkout.com\">Checkout.com Payment Gateway.</a>", 'wc_checkout_com');
        $this->title = __("Poli", 'wc_checkout_com');
        $this->has_fields = true;
        $this->supports = array('products');

        $this->init_form_fields();

        add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));
    }

    public function payment_fields()
    {   
        // get available apms depending on currency
        $apm_available = WC_Checkoutcom_Utility::get_alternative_payment_methods();

        ?>
            <script>
                jQuery('.payment_box.payment_method_wc_checkout_com_alternative_payments_poli').attr("style", "visibility: hidden;");
            </script>
            <input type="hidden" id="cko-apm" name="cko-apm" value="poli">
        <?php

        if (! in_array("poli", $apm_available) ) {
            ?>
                <script>
                    jQuery('.payment_method_wc_checkout_com_alternative_payments_poli').hide();
                </script>
            <?php
        }

    }
<commit_msg>ECPINT-2413<commit_after><?php

class WC_Gateway_Checkout_Com_Alternative_Payments_Poli extends WC_Gateway_Checkout_Com_Alternative_Payments {

    public function __construct()
    {
        $this->id = 'wc_checkout_com_alternative_payments_poli';
        $this->title = __("Poli", 'wc_checkout_com');
        $this->has_fields = true;
        $this->supports = array('products');

        $this->init_form_fields();

        add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));
    }

    public function payment_fields()
    {   
        // get available apms depending on currency
        $apm_available = WC_Checkoutcom_Utility::get_alternative_payment_methods();
        $message = __("Pay with Poli. You will be redirected upon place order", 'wc_checkout_com')

        ?>
           <p style="margin-bottom: 0;"> <?php echo $message ?> </p>
            <input type="hidden" id="cko-apm" name="cko-apm" value="poli">
        <?php

        if (! in_array("poli", $apm_available) ) {
            ?>
                <script>
                    jQuery('.payment_method_wc_checkout_com_alternative_payments_poli').hide();
                </script>
            <?php
        }

    }

{'fraction_non_alphanumeric': 0.12410329985652797, 'fraction_numerical': 0.001793400286944046, 'mean_word_length': 2.768918918918919, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 34, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '985100', 'n_tokens_mistral': 865, 'n_tokens_neox': 838, 'n_words': 137}