wallets.php
Helper functions that retrieve wallets.
Tags
Table of Contents
- load_wallets() : array<string|int, mixed>
- Takes an array of wallet post_ids and instantiates them into an array of Wallet objects.
- get_wallets() : array<string|int, Wallet>
- Retrieves all wallet posts that can be instantiated.
- get_ids_of_enabled_wallets() : array<string|int, mixed>
- Get the IDs of all enabled wallets.
- get_wallet_adapter_class_names() : array<string|int, mixed>
- Get the class names of all available declared adapters.
Functions
load_wallets()
Takes an array of wallet post_ids and instantiates them into an array of Wallet objects.
    
                    load_wallets(array<string|int, mixed> $post_ids) : array<string|int, mixed>
        If a wallet cannot be loaded due to Wallet::load() throwing, then it is skipped and the rest of the wallets will be loaded.
Parameters
- $post_ids : array<string|int, mixed>
- 
                    The array of integer post_ids 
Tags
Return values
array<string|int, mixed> —The array of Wallet objects.
get_wallets()
Retrieves all wallet posts that can be instantiated.
    
                    get_wallets() : array<string|int, Wallet>
    
    
    
        Return values
array<string|int, Wallet> —The Wallet objects representing posts of the custom post type wallets_wallet.
get_ids_of_enabled_wallets()
Get the IDs of all enabled wallets.
    
                    get_ids_of_enabled_wallets() : array<string|int, mixed>
        Wallets are enabled if:
- the admin has ticked the "enabled" box
- the admin has assigned a wallet adapter to the wallet
Return values
array<string|int, mixed> —get_wallet_adapter_class_names()
Get the class names of all available declared adapters.
    
                    get_wallet_adapter_class_names() : array<string|int, mixed>
        The class names of any concrete subclasses of Wallet_Adapter are returned.
Tags
Return values
array<string|int, mixed> —The names of the adapter classes.