Skip to navigation
How I enabled or disabled WordPress WooCommerce payment gateways via wp-cli
23.05.24
# with wp-cli ``` wp wc payment_gateway update cheque --user=1 --enabled=true wp wc payment_gateway update gc_paydirekt --user=1 --enabled=false wp wc payment_gateway update gc_giropay --user=1 --enabled=false wp wc payment_gateway update gc_creditcard --user=1 --enabled=false wp wc payment_gateway update paypal --user=1 --enabled=false ``` # in my docker bash script ```bash docker run --add-host "$DB_HOST:127.0.0.1" --net=host -v "$(dirname "$(pwd)")":`pwd` -w `pwd` -i --rm wordpress:cli wp wc payment_gateway update cheque --user=1 --enabled=true docker run --add-host "$DB_HOST:127.0.0.1" --net=host -v "$(dirname "$(pwd)")":`pwd` -w `pwd` -i --rm wordpress:cli wp wc payment_gateway update gc_paydirekt --user=1 --enabled=false docker run --add-host "$DB_HOST:127.0.0.1" --net=host -v "$(dirname "$(pwd)")":`pwd` -w `pwd` -i --rm wordpress:cli wp wc payment_gateway update gc_giropay --user=1 --enabled=false docker run --add-host "$DB_HOST:127.0.0.1" --net=host -v "$(dirname "$(pwd)")":`pwd` -w `pwd` -i --rm wordpress:cli wp wc payment_gateway update gc_creditcard --user=1 --enabled=false docker run --add-host "$DB_HOST:127.0.0.1" --net=host -v "$(dirname "$(pwd)")":`pwd` -w `pwd` -i --rm wordpress:cli wp wc payment_gateway update paypal --user=1 --enabled=false ```
https://github.com/woocommerce/woocommerce/issues/20526
Reply
Anonymous
Information Epoch 1732374876
Think parallel.
Home
Notebook
Contact us