• Resolved Greg

    (@pappgergely)


    Hi there,

    A client or ours runs a multilanguage e-commerce website (with WPML) and uses Klarna Checkout on several languages of the site, including german, swedish, danish, etc. (We are also using the Klarna Checkout for WooCommerce plugin.) The client has multiple Klarna accounts and thus has different keys for each language.

    In order for the checkout to work, currently we are using a WP filter in the step where the Klarna Checkout plugin fetches the credentials (kco_wc_credentials_from_session filter) to replace the keys based on the current WPML language, but we don’t have such an option for the Klarna Order Management plugin.

    Based on the 1.7.1 version of the plugin, we are suggesting the following change to the KOM_Request class, line 275:

    Instead of

    return $options[ $key ];

    we should have

    return apply_filters( 'kom_auth_component', $options[ $key ], $component_name, $this->order_id );

    Of course, the filter name is just a suggestion, but this would allow us to hook in and use the appropriate credentials that matches the language of the order.

    Can you let us know if this change (or something very similar to this) can make it into the next minor release?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add filter for credentials’ is closed to new replies.