Use this to dynamically create and set the content of a Bootstrap 4 Modal.
In this example, we chose an onclick
handler to initialize the modal (only once), and then set the content of the modal dynamically.
<?php | |
add_filter( 'vc_iconpicker-type-fontawesomenew', 'omnis_vc_iconpicker_type_fontawesome_5' ); | |
function omnis_vc_iconpicker_type_fontawesome_5( $icons ) { | |
$font_awesome_5 = array( | |
'Brands' => array( | |
array('fab fa-500px' => '500px'), | |
array('fab fa-accessible-icon' => 'accessible-icon'), | |
array('fab fa-accusoft' => 'accusoft'), | |
array('fab fa-adn' => 'adn'), |
// Code to be placed in functions.php of your theme or a custom plugin file. | |
add_filter( 'load_textdomain_mofile', 'load_custom_plugin_translation_file', 10, 2 ); | |
/* | |
* Replace 'textdomain' with your plugin's textdomain. e.g. 'woocommerce'. | |
* File to be named, for example, yourtranslationfile-en_GB.mo | |
* File to be placed, for example, wp-content/lanaguages/textdomain/yourtranslationfile-en_GB.mo | |
*/ | |
function load_custom_plugin_translation_file( $mofile, $domain ) { | |
if ( 'textdomain' === $domain ) { |
Use this to dynamically create and set the content of a Bootstrap 4 Modal.
In this example, we chose an onclick
handler to initialize the modal (only once), and then set the content of the modal dynamically.
// Save the current language in post_meta when checkout is processed (used to identify correct Email language) | |
add_action('woocommerce_checkout_update_order_meta', 'dartrax_save_language_on_checkout', 10, 2 ); | |
function dartrax_save_language_on_checkout( $order_id, $posted ) { | |
if( ! class_exists('TRP_Translate_Press') ) return ''; | |
global $TRP_LANGUAGE; | |
update_post_meta( $order_id, '_order_language', $TRP_LANGUAGE ); | |
} | |
// Woocommerce Germanized Mails | |
add_action( 'woocommerce_gzd_shipment_status_draft_to_shipped_notification', 'dartrax_prepare_locale_for_Mail_with_shipment_id', 5, 1 ); |
// Save the current language in post_meta when checkout is processed (used to identify correct Email language) | |
add_action('woocommerce_checkout_update_order_meta', 'dartrax_save_language_on_checkout', 10, 2 ); | |
function dartrax_save_language_on_checkout( $order_id, $posted ) { | |
if( ! class_exists('TRP_Translate_Press') ) return ''; | |
global $TRP_LANGUAGE; | |
update_post_meta( $order_id, '_order_language', $TRP_LANGUAGE ); | |
} | |
// Woocommerce Shipment Mails | |
add_action( 'woocommerce_order_status_processing_to_cancelled_notification','dartrax_prepare_locale_for_Mail_with_order_id', 5, 1 ); |