Closed topraf closed 5 years ago
This can be fixed by modifying the function that actually generates the code to run a check.
Function is located on line 123 in coinbase-commerce.php
It is called cb_order_meta_general
.
It can be modified to actually check if the order was paid with crypto.
/**
* Add order Coinbase meta after General and before Billing
*
* @see: https://rudrastyh.com/woocommerce/customize-order-details.html
*
* @param WC_Order $order WC order instance
*/
function cb_order_meta_general( $order ){ ?>
<?php $is_paid_crypto = $order->get_meta( '_coinbase_charge_id' ); ?>
<?php if ($is_paid_crypto) : ?>
<br class="clear" />
<h3>Coinbase Commerce Data</h3>
<div class="">
<p>Coinbase Commerce Reference # <?php echo esc_html($is_paid_crypto); ?></p>
</div>
<?php endif; ?>
<?php
}
Pasting that in my functions.php file creates a 500 error. Are you sure about the code? Hope to see as an option in the plugin soon!
Hey @topraf , you should not paste it in your funcitons.php. Instead, you can modify as mentioned in my comment above: "Function is located on line 123 in coinbase-commerce.php"
I am using it in a production environment with no issues.
Ah yeah ok; thanks! I'll keep the issue open so it can be implemented in the next version of the plugin
I honestly doubt it, those guys are not showing good levels of support thus far. I would advise you to dig in and do it yourself.
@topraf, this is fixed in the latest code, please stay tuned for the newest release.
The order received page shows Coinbase data even when payment through stripe . see here in this test order i made