<commit_before><?php

/**
 * Class WC_Checkoutcom_Cards_Settings
 */
class WC_Checkoutcom_Cards_Settings
{
    /**
     * CKO admin core settings fields
     * @return mixed
     */
    public static function core_settings()
    {
        $settings = array(
            'core_setting' => array(
                'title'       => __( 'Core settings', 'checkoutcom-cards-settings' ),
                'type'        => 'title',
                'description' => '',
            ),
            'enabled' => array(
                'id'      => 'enable',
                'title'   => __( 'Enable/Disable', 'checkoutcom-cards-settings' ),
                'type'    => 'checkbox',
                'label'   => __( 'Enable Checkout.com cards payment', 'checkoutcom-cards-settings' ),
                'description' => __( 'This enables Checkout.com. cards payment', 'checkoutcom-cards-settings' ),
                'desc_tip'    => true,
                'default'     => 'yes',
            ),
            'ckocom_environment' => array(
                'title' => __('Environment', 'checkoutcom-cards-settings'),
                'type' => 'select',
                'description' => __('When going to production, make sure to set this to Live', 'checkoutcom-cards-settings'),
                'desc_tip' => true,
                'options'     => array(
                    'sandbox'   => __('SandBox', 'checkoutcom-cards-settings'),
                    'live'      => __('Live', 'checkoutcom-cards-settings')
                ),
                'default' => 'sandbox'
            ),
            'title' => array(
                'title' => __('Payment Option Title', 'checkoutcom-cards-settings'),
                'type' => 'text',
                'label' => __('Pay by Card with Checkout.com', 'checkoutcom-cards-settings'),
                'description' => __('Title that will be displayed on the checkout page', 'checkoutcom-cards-settings'),
                'desc_tip' => true,
                'default'     => 'Pay by Card with Checkout.com',
            ),
            'ckocom_sk' => array(
                'title' => __('Secret Key', 'checkoutcom-cards-settings'),
                'type' => 'text',
                'description' => __('You can '.'<a href="https://docs.checkout.com/docs/update-your-hub-settings#section-manage-the-api-keys">find your secret key </a>'. 'in the Checkout.com Hub', 'checkoutcom-cards-settings'),
                'placeholder' => 'sk_xxx'
            ),
            'ckocom_pk' => array(
                'title' => __('Public Key', 'checkoutcom-cards-settings'),
                'type' => 'text',
                'description' => __('You can '.'<a href="https://docs.checkout.com/docs/update-your-hub-settings#section-manage-the-api-keys">find your public key </a>'. 'in the Checkout.com Hub', 'checkoutcom-cards-settings'),
                'placeholder' => 'pk_xxx'
            )
        );

        return apply_filters( 'wc_checkout_com_cards', $settings );
    }

    /**
     * CKO admin card setting fields
     * @return mixed|void
     */
    public static function cards_settings()
    {
        /**
         * script to hide and show fields
         */
        wc_enqueue_js( "
            jQuery( function(){<commit_msg>Fix reference link in core settings page<commit_after><?php

/**
 * Class WC_Checkoutcom_Cards_Settings
 */
class WC_Checkoutcom_Cards_Settings
{
    /**
     * CKO admin core settings fields
     * @return mixed
     */
    public static function core_settings()
    {
        $settings = array(
            'core_setting' => array(
                'title'       => __( 'Core settings', 'checkoutcom-cards-settings' ),
                'type'        => 'title',
                'description' => '',
            ),
            'enabled' => array(
                'id'      => 'enable',
                'title'   => __( 'Enable/Disable', 'checkoutcom-cards-settings' ),
                'type'    => 'checkbox',
                'label'   => __( 'Enable Checkout.com cards payment', 'checkoutcom-cards-settings' ),
                'description' => __( 'This enables Checkout.com. cards payment', 'checkoutcom-cards-settings' ),
                'desc_tip'    => true,
                'default'     => 'yes',
            ),
            'ckocom_environment' => array(
                'title' => __('Environment', 'checkoutcom-cards-settings'),
                'type' => 'select',
                'description' => __('When going to production, make sure to set this to Live', 'checkoutcom-cards-settings'),
                'desc_tip' => true,
                'options'     => array(
                    'sandbox'   => __('SandBox', 'checkoutcom-cards-settings'),
                    'live'      => __('Live', 'checkoutcom-cards-settings')
                ),
                'default' => 'sandbox'
            ),
            'title' => array(
                'title' => __('Payment Option Title', 'checkoutcom-cards-settings'),
                'type' => 'text',
                'label' => __('Pay by Card with Checkout.com', 'checkoutcom-cards-settings'),
                'description' => __('Title that will be displayed on the checkout page', 'checkoutcom-cards-settings'),
                'desc_tip' => true,
                'default'     => 'Pay by Card with Checkout.com',
            ),
            'ckocom_sk' => array(
                'title' => __('Secret Key', 'checkoutcom-cards-settings'),
                'type' => 'text',
                'description' => __('You can '.'<a href="https://www.checkout.com/docs/the-hub/update-your-hub-settings#Manage_the_API_keys">find your secret key </a>'. 'in the Checkout.com Hub', 'checkoutcom-cards-settings'),
                'placeholder' => 'sk_xxx'
            ),
            'ckocom_pk' => array(
                'title' => __('Public Key', 'checkoutcom-cards-settings'),
                'type' => 'text',
                'description' => __('You can '.'<a href="https://www.checkout.com/docs/the-hub/update-your-hub-settings#Manage_the_API_keys">find your public key </a>'. 'in the Checkout.com Hub', 'checkoutcom-cards-settings'),
                'placeholder' => 'pk_xxx'
            )
        );

        return apply_filters( 'wc_checkout_com_cards', $settings );
    }

    /**
     * CKO admin card setting fields
     * @return mixed|void
     */
    public static function cards_settings()
    {
        /**
         * script to hide and show fields
         */
        wc_enqueue_js( "
            jQuery( function(){
{'fraction_non_alphanumeric': 0.1486590038314176, 'fraction_numerical': 0.0, 'mean_word_length': 1.7045171985080811, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 87, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '5330109', 'n_tokens_mistral': 1843, 'n_tokens_neox': 1784, 'n_words': 389}