Hi @kiran11more
Here are a couple code snippets and information on what you are looking for. The custom code below can be added to your child theme functions.php file or in a custom plugin.
1. Yes the following should work in most themes, though depending on your theme might need to adjust the CSS a bit:
remove_action( 'woocommerce_proceed_to_checkout', 'wc_cart_pdf_button', 21 );
add_action( 'woocommerce_cart_actions', 'wc_cart_pdf_button' );
2. Yes here is the FAQ link on how to do that
3. Yes use the following code to change the filename:
function child_theme_cart_pdf_filename( $filename ) {
return 'newfilename.pdf';
}
add_filter( 'wc_cart_pdf_filename', 'child_theme_cart_pdf_filename' );
4. It’s possible but requires additional coding. Basically you will create your popup form, and upon submission of the form redirect the user to the PDF form page using the following URL/action:
<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'cart-pdf' => '1' ), wc_get_cart_url() ), 'cart-pdf' ) ); ?>
Thread Starter
Kiran
(@kiran11more)
I am really thankful for your valuable time and reply. Please take a bow.
@kiran11more
Sure thing – is there anything else I can help with?