Yeah you would have to add something like this to your functions.php:
function child_wc_cart_pdf_button() {
if( ! is_cart() || WC()->cart->is_empty() ) {
return;
}
?>
<a href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'cart-pdf' => '1' ), wc_get_cart_url() ), 'cart-pdf' ) );?>" class="cart-pdf-button" target="_blank" title="<?php esc_attr_e( 'Your title here', 'wc-cart-pdf' ); ?>">
<img src="//test.pahedomotica.nl/wp-content/uploads/pdf-logo-50px.png" alt="<?php esc_attr_e( 'Alt tag here', 'wc-cart-pdf' ); ?>" width="50" height="50" />
</a>
<?php
}
add_action( 'woocommerce_proceed_to_checkout', 'child_wc_cart_pdf_button', 21 );
remove_action( 'woocommerce_proceed_to_checkout', 'wc_cart_pdf_button', 21 );
You probably won’t need the additional CSS I provided earlier
-
This reply was modified 4 years, 6 months ago by David Jensen.
-
This reply was modified 4 years, 6 months ago by David Jensen.