Re-using default payment methods
-
Have a custom made site that used the site builder’s gatways def.
I’d like to change those defs back to woocommerce original php
how is that possible without harming other parts of the site?
I want apps payment (works like cash) and currently there’s no title on the checkout page due to the code written by the developers
this is the code used now to replace the original WC defs$available_gateways = WC()->payment_gateways->get_available_payment_gateways(); if(count($available_gateways)){ ?> <div class="block-content"> <?php foreach($available_gateways as $gateway){ ?> <div class="checkbox payment-radio radio <?php echo $gateway->id; ?>"> <span> <span class="icon webp-bg-png"></span> <span> <?php if($gateway->id=='paypal'){ is_editable_field('left_block2_paypal_title', array('hover_parent_inline_block' => true)); the_field('left_block2_paypal_title'); }elseif($gateway->id=='icredit_payment'){ is_editable_field('left_block2_visa_title', array('hover_parent_inline_block' => true)); the_field('left_block2_visa_title'); } ?> </span> </span> <input type="radio" name="payment_method" value="<?php echo $gateway->id; ?>" <?php if($checkout->get_value('payment_method')==$gateway->id) echo ' checked'; ?> /> </div> <?php } ?> </div> <?php } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Re-using default payment methods’ is closed to new replies.