Giter Site home page Giter Site logo

Comments (6)

topraf avatar topraf commented on June 17, 2024 1

Ah yeah ok; thanks! I'll keep the issue open so it can be implemented in the next version of the plugin

from coinbase-commerce-woocommerce.

Nikoogle avatar Nikoogle commented on June 17, 2024

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
}

from coinbase-commerce-woocommerce.

topraf avatar topraf commented on June 17, 2024

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!

from coinbase-commerce-woocommerce.

Nikoogle avatar Nikoogle commented on June 17, 2024

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.

from coinbase-commerce-woocommerce.

Nikoogle avatar Nikoogle commented on June 17, 2024

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.

from coinbase-commerce-woocommerce.

guacamoli avatar guacamoli commented on June 17, 2024

@topraf, this is fixed in the latest code, please stay tuned for the newest release.

from coinbase-commerce-woocommerce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.