skip to Main Content

The BookChoix Bookstore theme includes action hooks for integrating your own PDF viewer using the action hooks shown below.

Before integrating your custom PDF viewer, you have to tell the BookChoix theme that you’re going to use a Custom viewer by adding the below PHP constant.

define( 'BKC_CUSTOM_PDFVIEWER', true );

bookchoix_main_pdf_single

For embedding custom viewer in WooCommerce single page for attaching the Main PDF (all pages).

Example code snippet

add_action( 'bookchoix_main_pdf_single', 'custom_main_viewer', 10, 2 );
    function custom_main_viewer( $book_url, $pdf_id ) {
    // do something with $book_url and $pdf_id
}

bookchoix_sample_pdf_single

For embedding custom viewer in WooCommerce single page for attaching the Sample PDF.

add_action( 'bookchoix_sample_pdf_single', 'custom_sample_viewer', 10, 2 );
    function custom_sample_viewer( $book_url, $pdf_id ) {
    // do something with $book_url and $pdf_id
}

bookchoix_main_pdf_my_accounts

For embedding custom viewer in WooCommerce My accounts -> My Books page for attaching the Main PDF (all pages).

add_action( 'bookchoix_main_pdf_my_accounts', 'custom_mybooks_viewer', 10, 2 );
    function custom_mybooks_viewer( $book_url, $pdf_id ) {
    // do something with $book_url and $pdf_id
}
Back To Top

We use cookies to give you the best online experience. By agreeing you accept the use of cookies in accordance with our cookie policy.

Privacy Settings saved!
Privacy Settings

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. Control your personal Cookie Services here.


  • wordpress_test_cookie
  • wordpress_logged_in_
  • wordpress_sec

Decline all Services
Accept all Services