Plugin Directory

Changeset 2469950


Ignore:
Timestamp:
02/06/2021 07:10:45 AM (5 years ago)
Author:
infinitools
Message:

Some fixes

Location:
decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/tags/1.0.2/inc/plugin.php

    r2466373 r2469950  
    172172<?php
    173173        } else {
    174             ?>
     174?>
    175175
    176176                  <th>Date Paid</th>
     
    178178
    179179<?php
    180         } ?>
     180        }
     181?>
    181182              </tr>
    182183            </tbody>
    183184        </table>
    184185<?php
    185     }
     186}
    186187
    187188add_action('show_user_profile', 'cryptodec_user_profile_field');
     
    215216    }
    216217}
     218
     219//add_filter( 'woocommerce_email_order_meta_fields', 'cryptodec_woocommerce_email_order_meta_fields', 10, 3 );
     220
     221function cryptodec_woocommerce_email_order_meta_fields( $fields, $sent_to_admin, $order ) {
     222    $fields['best_btc_wallet'] = array(
     223        'label' => __( 'Wallet Address' ),
     224        'value' => get_post_meta( $order->id, '_cryptodec_best_btc_wallet', true ),
     225    );
     226    $fields['order_total'] = array(
     227        'label' => __( 'Total BTC' ),
     228        'value' => get_post_meta( $order->id, '_cryptodec_total', true ),
     229    );
     230    return $fields;
     231}
     232
     233add_action( 'woocommerce_email_after_order_table', 'cryptodec_woocommerce_email_after_order_table_func' );
     234function cryptodec_woocommerce_email_after_order_table_func( $order ) {
     235    ?>
     236
     237    <h3>Bitcoin Payment Details</h3>
     238    <table>
     239        <tr>
     240            <td>Bitcoin Wallet Address: </td>
     241            <td><?php echo wptexturize( get_post_meta( $order->id, '_cryptodec_best_btc_wallet', true ) ); ?></td>
     242        </tr>
     243        <tr>
     244            <td>Amount in BTC to transfer: </td>
     245            <td><?php echo wptexturize(  get_post_meta( $order->id, '_cryptodec_total', true ) ); ?></td>
     246        </tr>
     247        <tr>
     248            <td>Note: </td>
     249            <td>Please transfer Exact amount.</td>
     250        </tr>
     251    </table>
     252
     253    <?php
     254}
  • decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/trunk/cryptodec-payment-gateway.php

    r2466373 r2469950  
    4646    'full_name'         => 'CryptoDecPaymentGateway',
    4747    'full_author'       => 'ITLS',
    48     'version'           => '1.0.2',
     48    'version'           => '1.0.1',
    4949
    5050    'settings_version'  => '3',
  • decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/trunk/inc/plugin.php

    r2466373 r2469950  
    172172<?php
    173173        } else {
    174             ?>
     174?>
    175175
    176176                  <th>Date Paid</th>
     
    178178
    179179<?php
    180         } ?>
     180        }
     181?>
    181182              </tr>
    182183            </tbody>
    183184        </table>
    184185<?php
    185     }
     186}
    186187
    187188add_action('show_user_profile', 'cryptodec_user_profile_field');
     
    215216    }
    216217}
     218
     219//add_filter( 'woocommerce_email_order_meta_fields', 'cryptodec_woocommerce_email_order_meta_fields', 10, 3 );
     220
     221function cryptodec_woocommerce_email_order_meta_fields( $fields, $sent_to_admin, $order ) {
     222    $fields['best_btc_wallet'] = array(
     223        'label' => __( 'Wallet Address' ),
     224        'value' => get_post_meta( $order->id, '_cryptodec_best_btc_wallet', true ),
     225    );
     226    $fields['order_total'] = array(
     227        'label' => __( 'Total BTC' ),
     228        'value' => get_post_meta( $order->id, '_cryptodec_total', true ),
     229    );
     230    return $fields;
     231}
     232
     233add_action( 'woocommerce_email_after_order_table', 'cryptodec_woocommerce_email_after_order_table_func' );
     234function cryptodec_woocommerce_email_after_order_table_func( $order ) {
     235    ?>
     236
     237    <h3>Bitcoin Payment Details</h3>
     238    <table>
     239        <tr>
     240            <td>Bitcoin Wallet Address: </td>
     241            <td><?php echo wptexturize( get_post_meta( $order->id, '_cryptodec_best_btc_wallet', true ) ); ?></td>
     242        </tr>
     243        <tr>
     244            <td>Amount in BTC to transfer: </td>
     245            <td><?php echo wptexturize(  get_post_meta( $order->id, '_cryptodec_total', true ) ); ?></td>
     246        </tr>
     247        <tr>
     248            <td>Note: </td>
     249            <td>Please transfer Exact amount.</td>
     250        </tr>
     251    </table>
     252
     253    <?php
     254}
Note: See TracChangeset for help on using the changeset viewer.