Add-on cannot not work with WooCommerce

QuestionsCategory: PDF Light ViewerAdd-on cannot not work with WooCommerce
Kelvin Lee asked 6 years ago
Dear Sir/Madam,
I got 404 Error when I submit with only me and admin status.
I install the PDF Light Viewer Plugin Pro to my site with WooCommerce.
PDF can be rendered if adding shortcode in page
I insert Viewer into WooCommerce Tabs with below code

add_filter( ‘woocommerce_product_tabs’, ‘woo_new_product_tab’ );
function woo_new_product_tab( $tabs ) {
// Adds preview subscription tab
$tabs[‘test_tab’] = array(
‘title’ => __( ‘Preview’, ‘woocommerce’ ),
‘priority’ => 50,
‘callback’ => ‘woo_preview_subscription_tab_content’
return $tabs;
function woo_preview_subscription_tab_content() {

global $wpdb;
$posttitle = ‘WR150’;
$postid = $wpdb->get_var( “SELECT ID FROM $wpdb->posts WHERE post_title = ‘” . $posttitle . “‘” );
echo PdfLightViewer_FrontController::display_pdf_book(array(‘id’ => $postid));

Problem output can be found and from  I am sure the PDF (post id 2079) is existed. What is the problem the Viewer cannot be viewed properly?
Best regards,

1 Answers
support answered 6 years ago
Hello Kelvin,
Let’s continue discussion in the