Skip to content

Instantly share code, notes, and snippets.

@kreamweb
Created November 19, 2022 17:04
Show Gist options
  • Save kreamweb/6d090660b23a77d5d0237444d57197ac to your computer and use it in GitHub Desktop.
Save kreamweb/6d090660b23a77d5d0237444d57197ac to your computer and use it in GitHub Desktop.
<?php
add_action( 'admin_enqueue_scripts', 'ywpi_pdf_template_licence_key', 99 );
if ( ! function_exists( 'ywpi_pdf_template_licence_key' ) ) {
function ywpi_pdf_template_licence_key() {
$js = "wp.hooks.addFilter('ywpi_pdf_template_demo', 'yith-woocommerce-pdf-invoice/customization', (key) => {
return 'ywpi_live_demo';
} );";
wp_add_inline_script( 'ywpi-pdf-template-builder-script', $js, 'after' );
}
}
add_action( 'admin_enqueue_scripts', 'ywraq_pdf_template_licence_key', 99 );
if ( ! function_exists( 'ywraq_pdf_template_licence_key' ) ) {
function ywraq_pdf_template_licence_key() {
$js = "wp.hooks.addFilter('ywraq_pdf_template_demo', 'yith-woocommerce-request-a-quote/customization', (key) => {
return 'ywraq_live_demo';
} );";
wp_add_inline_script( 'ywraq-pdf-template-builder-script', $js, 'after' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment