View Issue Details

IDProjectCategoryView StatusLast Update
0006174TalerWeb site(s)public2021-08-24 16:23
ReporterbuckE Assigned ToChristian Grothoff  
PrioritylowSeverityfeatureReproducibilityhave not tried
Status closedResolutionno change required 
Product Versiongit (master) 
Target Version0.8Fixed in Version0.8 
Summary0006174: Improvement: add wp-cli support to GNU Taler WordPress plugin
DescriptionIf the GNU Taler Wordpress/WooCommerce plugin will be used programmatically (ex. in scripts) it will be necessary to support wp-cli.

Doc on subject: https://wpreset.com/add-wp-cli-support-wordpress-plugin/

Additional InformationRecommended items to automate:

Title (--title)
Description (--description)
GNU Taler Back-end URL (--back-end)
GNU Taler Backend API Key (--api-key)
GNU Taler Payment URL (--payment-url)
Summary Text of the Order (--summary-text)
Send Merchant Information? (--send-merchant-info)
Name of This Webshop (--webshop-name)

Example:

$ wp taler set --title="GNU Taler Patments" --description="Pay with GNU Taler" --back-end="http://backend.demo.taler.net" --api-key="asdfasdf" --payment-url="https://backend.demo.taler.net" --summary-text="Using GNU Taler will make you more attractive." --webshop-name="My Store" --send-merchant-info
  
Argument against: WooCommerce requires GUI intervention anyway. So full automation is not possible for https://bugs.gnunet.org/view.php?id=6144. However this is a good feature for large/bulk/geek deployments.
TagsNo tags attached.

Activities

Christian Grothoff

2020-04-11 11:07

manager   ~0015620

One argument for this aside from full automation: once this exists, we can also in our own Documentation tell people to run 'command X/Y/Z' instead of (or in addition to) 'click here, then there', and it is likely that giving explicit shell commands to run is more reliable and faster for site administrators than finding things in the (more likely changing, possibly translated) menus.

buckE

2020-04-13 03:34

reporter   ~0015633

I do think this is a good thing to add, especially because it is easy. However I disagree with this statement:

> it is likely that giving explicit shell commands to run is more reliable and faster for site administrators than finding things in the (more likely changing, possibly translated) menus.

Actually, it's very unlikely. It would be true of a good/robust/unix-thinking system, and if wp-cli were build by WP. But WordPress is a GUI-first system, wp-cli is not part of any default WP install, and I'm not even sure what the relationship is between the WP team and the WP-cli team. These add up to making wp-cli a real pain, unreliable, really not smart to use in a script, and it's why I would have preferred to use standard tools to automate the WooTaler site instead of spending so much more time on wp-cli. I've built big, automated WP installs before. I've never played with rinky-dink wp-cli until it was specified as a late-entry requirement in the WooTaler build.

It should never (until wp-cli is part of a default WP install) be recommended to do things with a wp-cli-first approach, particularly as long as WP specifically recommends a GUI-first approach and even requires it for basic things like WooComerce first-run. Oh, and until wp-cli has a good API because Jesus! *But* by supporting it in our plugin, we make it more useful and more likely that WP will someday take over wp-cli.

My recommendation is that the current plugin devs take a quick look at the above link, just to keep a vague mental map of what hooks might be needed as they develop future versions. Then when they release the next version if you want me to add support, I'll do that. (But let's not hold up the next version for this.)

Christian Grothoff

2020-04-13 10:47

manager   ~0015637

Oh, I didn't know WP-cli was *not* part of a core Wordpress installation. I thought it was (see, I don't know much about Wordpress!). And yes, this is not release critical (hence no target version in our system). Oh, and we don't currently have developers taking care of the Taler plugin...

Christian Grothoff

2020-07-24 17:32

manager   ~0016517

Actually, this whole bug was bogus: the plugin already can be fully configured, simply providing the 'settings' in JSON using:

 wp wc --user=admin payment_gateway update gnutaler --enabled=true --settings='{"title":{"id":"title","label":"Title","description":"This is what the customer will see when choosing payment methods.","type":"text","value":"GNU Taler","default":"GNU Taler","tip":"This is what the customer will see when choosing payment methods.","placeholder":""},"GNU_Taler_Backend_URL":{"id":"GNU_Taler_Backend_URL","label":"GNU Taler Back-end URL","description":"Set the URL of the GNU Taler back-end. (Ex: https:\/\/backend.demo.taler.net)","type":"text","value":"https:\/\/backend.demo.taler.net\/","default":"","tip":"Set the URL of the GNU Taler back-end. (Ex: https:\/\/backend.demo.taler.net)","placeholder":""},"GNU_Taler_Backend_API_Key":{"id":"GNU_Taler_Backend_API_Key","label":"GNU Taler Backend API Key","description":"Enter your API key to authenticate with the GNU Taler back-end.","type":"text","value":"Sandbox","default":"","tip":"Enter your API key to authenticate with the GNU Taler back-end.","placeholder":""},"Payment_url":{"id":"Payment_url","label":"GNU Taler Payment URL","description":"Enter the URL for your (merchant) GNU Taler Wallet, where customer coins will be sent.","type":"text","value":"payto:\/\/x-taler-bank\/bank.demo.taler.net\/Merchant","default":"","tip":"Enter the URL for your (merchant) GNU Taler Wallet, where customer coins will be sent.","placeholder":""},"Order_text":{"id":"Order_text","label":"Summary Text of the Order","description":"Set the text the customer will see when confirming payment.","type":"text","value":"Please Confirm Order","default":"Please Confirm Order","tip":"Set the text the customer will see when confirming payment.","placeholder":""},"merchant_information":{"id":"merchant_information","label":"Enable sending your merchant information to the GNU Taler back-end","description":"Do you want to send your merchant information to the GNU Taler back-end with this transaction?","type":"checkbox","value":"yes","default":"yes","tip":"Do you want to send your merchant information to the GNU Taler back-end with this transaction?","placeholder":""},"merchant_name":{"id":"merchant_name","label":"Name of This Webshop","description":"Set the name of this webshop that the customer will see during the payment transaction.","type":"text","value":"GNU Taler WooCommerce Demonstrator","default":"","tip":"Set the name of this webshop that the customer will see during the payment transaction.","placeholder":""}}'

Christian Grothoff

2020-07-24 17:33

manager   ~0016518

Deployed as this in buildWebstore.sh.

Issue History

Date Modified Username Field Change
2020-04-11 08:20 buckE New Issue
2020-04-11 08:20 buckE Status new => assigned
2020-04-11 08:20 buckE Assigned To => Christian Grothoff
2020-04-11 11:05 Christian Grothoff Assigned To Christian Grothoff =>
2020-04-11 11:05 Christian Grothoff Severity minor => feature
2020-04-11 11:05 Christian Grothoff Status assigned => confirmed
2020-04-11 11:05 Christian Grothoff Product Version => git (master)
2020-04-11 11:07 Christian Grothoff Note Added: 0015620
2020-04-13 03:34 buckE Note Added: 0015633
2020-04-13 10:47 Christian Grothoff Note Added: 0015637
2020-04-15 23:56 Christian Grothoff Priority normal => low
2020-07-24 17:32 Christian Grothoff Note Added: 0016517
2020-07-24 17:33 Christian Grothoff Assigned To => Christian Grothoff
2020-07-24 17:33 Christian Grothoff Status confirmed => resolved
2020-07-24 17:33 Christian Grothoff Resolution open => no change required
2020-07-24 17:33 Christian Grothoff Fixed in Version => 0.8
2020-07-24 17:33 Christian Grothoff Note Added: 0016518
2020-07-24 17:33 Christian Grothoff Target Version => 0.8
2021-08-24 16:23 Christian Grothoff Status resolved => closed