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
Zobrazení odkazu na fakturu na libovolném místě – WPify

Dokumentace

Zobrazení odkazu na fakturu na libovolném místě

Pokud vám vkládání odkazu na místa z nastavení nestačí, nebo používáte editor, který ruší základní hooky WooCommerce emailů, tak odkaz na fakturu můžete vložit na libovolné místo pomocí shortcode

[invoice_link]

[basepress-notice style=“warning“]Shortcode vyžaduje umístění na místo kde se nachází informace o objednávce a dokáže si je tak načíst.[/basepress-notice]

nebo pomocí nahookované akce

do_action('wpify_woo_fakturoid_render_link', $order);

Tuto akci můžete vložit na libovolné místo vaší šablony nebo e-mailů a jediné co potřebuje je pole objednávky WC_Order.

Například pro vložení odkazu do emailů hned k detailům zákazníka můžete využít tuto funkci:

 /**
 * Add invoice link to custom position in emails
 *
 * @param WC_Order $order WC order
 */
function invoice_in_email_customer_details( WC_Order $order ) {
	do_action('wpify_woo_fakturoid_render_link', $order);
}
add_action( 'woocommerce_email_customer_details', 'invoice_in_email_customer_details', 15, 1 );

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

[basepress-notice style=“info“]Pokud vkládáte odkaz na vlastní místo doporučujeme defaultní umístění v nastavení modulu nastavit na „Nezobrazovat“ aby nedocházelo k duplicitnímu zobrazení odkazu.[/basepress-notice]