Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the simple-custom-post-order domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/staging.wpify.io/web/wp/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woocommerce domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/staging.wpify.io/web/wp/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woocommerce-subscriptions domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/staging.wpify.io/web/wp/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wpify-woo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/staging.wpify.io/web/wp/wp-includes/functions.php on line 6114
Úprava napojení na Fakturoid účet – WPify

Dokumentace

Úprava napojení na Fakturoid účet

Pokud z nějakého důvodu potřebujete programově upravit napojení na Fakturoid účet tak můžete využít následující filtr.

apply_filters( 'wpify_woo_fakturoid_client_settings', $client_settings )

Aktuálně odesílaná data jsou

$client_settings = array(
  'domain'  // doména Fakturiud účtu
  'email'   // přihlašovací email
  'api_key' // api klíč
);

Pro úpravu tohoto nastavení můžete využít následující funkci. Například v případě kdy chcete vytvářet faktury pod odlišnými uživatelskými účty.

/**
 * Edit connection to Fakturoid account
 * 
 * @param array $client_settings Client settings
 *
 * @return array
 */
function edit_fakturoid_client_settings( $client_settings ): array {
    if ( /* vaše podmínka */ ) {
	    $client_settings['email'] = 'novy@email.cz';
	    $client_settings['api_key'] = 'unikatni/klic*uctu@123';
    }

	return $client_settings;
}
add_action( 'wpify_woo_fakturoid_client_settings', 'edit_fakturoid_client_settings', 10, 1 );

[basepress-notice style=“info“]Vlastní funkce můžete vložit buď do tzv. child šablony nebo pomocí pluginu Code Snippets[/basepress-notice]