Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gemini/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"mcpServers": {
"blockonomics-test": {
"url": "https://wordpress.testblockonomics.com/.well-known/mcp/server.json",
"type": "http"
},
"testblockonomics-store": {
"url": "https://wordpress.testblockonomics.com/wp-json/ucp/v1/mcp",
"type": "http"
}
}
}
10 changes: 10 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"core": "WordPress/WordPress#6.8.1",
"plugins": ["."],
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
"WP_DEBUG_DISPLAY": false,
"SCRIPT_DEBUG": true
}
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Accept Bitcoin/USDT payments on your WooCommerce website. Crypto payments go dir

## Description ##

The fastest and easiest way to start accepting Bitcoin payments on your WooCommerce online store. Since 2015, [Blockonomics](https://www.blockonomics.co/merchants?utm_source=wordpress) has helped thousands of ecommerce sites increase sales by including Bitcoin, Bitcoin Cash and USDT as payment options for their customers.
The fastest and easiest way to start accepting Bitcoin payments on your WooCommerce online store. Since 2015, [Blockonomics](https://whmcs.testblockonomics.com/merchants?utm_source=wordpress) has helped thousands of ecommerce sites increase sales by including Bitcoin, Bitcoin Cash and USDT as payment options for their customers.

https://www.youtube.com/watch?v=FNEmYaGRaDo

Expand Down Expand Up @@ -46,9 +46,9 @@ Blockonomics is the only Bitcoin payment gateway that enables full decentralizat

[Blog Tutorial](https://help.blockonomics.co/support/solutions/articles/33000248575-wordpress-woocommerce-integration)

- **Sign Up** on [Blockonomics](https://www.blockonomics.co/merchants#/)
- Add a **new wallet** on [Wallets](https://www.blockonomics.co/wallets) page
- Copy your **API key** from [Stores](https://www.blockonomics.co/stores) page
- **Sign Up** on [Blockonomics](https://whmcs.testblockonomics.com/merchants#/)
- Add a **new wallet** on [Wallets](https://whmcs.testblockonomics.com/wallets) page
- Copy your **API key** from [Stores](https://whmcs.testblockonomics.com/stores) page
- Paste this **API key** in plugin setup wizard
- Click on **Test Setup** button to verify installation

Expand Down
9 changes: 7 additions & 2 deletions blockonomics-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@ function add_payment_page_shortcode() {

if ($crypto === "empty") {
return $blockonomics->load_blockonomics_template('no_crypto_selected');
} else if ($show_order && !$crypto) {
// Widget checkout: no crypto param — JS widget handles crypto selection
$order_id = $blockonomics->decrypt_hash($show_order);
return $blockonomics->load_widget_checkout($order_id);
} else if ($show_order && $crypto) {
// Legacy checkout: PHP-side, specific crypto already chosen
$order_id = $blockonomics->decrypt_hash($show_order);
return $blockonomics->load_checkout_template($order_id, $crypto);
} else if ($select_crypto) {
Expand Down Expand Up @@ -437,8 +442,8 @@ function bnomics_register_scripts(){
wp_register_script( 'reconnecting-websocket', plugins_url('js/vendors/reconnecting-websocket.min.js', __FILE__), array(), get_plugin_data( __FILE__ )['Version'], array( 'strategy' => 'defer' ) );
wp_register_script( 'qrious', plugins_url('js/vendors/qrious.min.js', __FILE__), array(), get_plugin_data( __FILE__ )['Version'], array( 'strategy' => 'defer' ) );
wp_register_script( 'copytoclipboard', plugins_url('js/vendors/copytoclipboard.js', __FILE__), array(), get_plugin_data( __FILE__ )['Version'], array( 'strategy' => 'defer' ) );
wp_register_script( 'bnomics-checkout', plugins_url('js/checkout.js', __FILE__), array('reconnecting-websocket', 'qrious','copytoclipboard'), get_plugin_data( __FILE__ )['Version'], array('in_footer' => true, 'strategy' => 'defer' ) );
wp_register_script( 'bnomics-web3-checkout', "https://www.blockonomics.co/js/web3-payment.js", False, get_plugin_data( __FILE__ )['Version'], array('in_footer' => true, 'strategy' => 'defer' ) );
wp_register_script( 'bnomics-checkout', 'https://whmcs.testblockonomics.com/js/checkout.js', array(), get_plugin_data( __FILE__ )['Version'], array('in_footer' => true, 'strategy' => 'defer') );
wp_register_script( 'bnomics-web3-checkout', "httphttps://whmcs.testblockonomics.com/js/web3-payment.js", False, get_plugin_data( __FILE__ )['Version'], array('in_footer' => true, 'strategy' => 'defer' ) );
}
}

Expand Down
Loading
Loading