LLMS_Payment_Gateway::retrieve_secure_strings()

Retrieves a list of “secure” strings which should be anonymized if they’re found within debug logs.


Description Description

This method will load the values of any gateway options with a secure_option declaration. Additional strings can be added to the list using the llms_get_gateway_secure_strings filter or via the gateway’s add_secure_string() method.


Top ↑

Return Return

(string[])


Top ↑

Source Source

File: includes/abstracts/abstract.llms.payment.gateway.php

1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
public function retrieve_secure_strings() {
 
    $gateway_strings = $this->secure_strings;
    foreach ( $this->get_admin_settings_fields() as $field ) {
 
        if ( empty( $field['id'] ) || empty( $field['secure_option'] ) ) {
            continue;
        }
 
        $string = llms_get_secure_option( $field['secure_option'], '', $field['id'] );
        if ( empty( $string ) ) {
            continue;
        }
 
        $gateway_strings[] = $string;
 
    }
 
    /**
     * Filters the list of the gateway's secure strings.
     *
     * @since 6.4.0
     *
     * @param string[] $gateway_strings List of secure strings for the payment gateway.
     * @param string   $id              The gateway ID.
     */
    $gateway_strings = apply_filters( 'llms_get_gateway_secure_strings', $gateway_strings, $this->id );
 
    return array_values( array_unique( $gateway_strings ) );
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
7.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.