WOOSL/API_call/clean_machine_hash

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPrint this page

Type
Filter

Arguments
(array) $filtered_machine_hash
(array) $machine_hash

Description
Apply custom filtering for the customer machine hash. This can be a domain name, a unique ID etc. Use the filter to avoid the core further processing this variable value.

Observation
The cache module needs to be off for the filter to trigger. Or ensure the custom code is placed within the /wp-content/mu-plugins/woosl-custom.php file

Example of usage
Ensure all the strings are uppercase.

    add_filter( 'WOOSL/API_call/clean_machine_hash', '__woosl_api_clean_machine_hash', 10, 2 );   
    function __woosl_api_clean_machine_hash( $filtered_machine_hash, $machine_hash )
        {
            $filtered_machine_hash  =   strtoupper( $machine_hash );
            
            return $filtered_machine_hash;   
        }

By woocommerce-sl, posted on February 22, 2022

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments