Viewing 1 replies (of 1 total)
  • Plugin Contributor Darren Peyou

    (@dpeyou)

    Hi @pickweb83910,

    When saying commission, do you mean the fees? Forgive me if I’m off…
    …in case I’m right, this is something that can easily be done with the Premium Templates extension of the plugin, thanks to its Customizer:

    Order details screen:
    stripe-Fee

    In the Customizer:
    stripe-Fee-Customizer

    And on the invoice:
    Screenshot-from-2021-04-12-15-11-08

    With the free version, you’d need to use a code snippet as follows:

    add_action( 'wpo_wcpdf_after_order_details', 'wpo_wcol_stripe_fee', 10, 2 );
    function wpo_wcol_stripe_fee ( $template_type, $order ) {
    	// if order is empty, bail!
    	if ( empty($order) ) { return; }
    
    	$stripe_fee = $order->get_meta('_stripe_fee');
    	?>
    	<div class="stripe-fee">
    		<strong>Stripe Fee</strong>
    		<div><?php echo $stripe_fee; ?> </div>
    	</div>
    	<?php
    }

    If you haven’t used code snippets before: https://docs.wpovernight.com/general/how-to-use-filters/

    • This reply was modified 5 years, 2 months ago by Darren Peyou.
    • This reply was modified 5 years, 2 months ago by Darren Peyou.
Viewing 1 replies (of 1 total)

The topic ‘Stripe’ is closed to new replies.