barotoardi
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Can’t update product using REST APIHi,
I have resolved my problem by migrating woocommerce to other hosting. I still don’t know which server setup that need to change. But after moving to other server, rest api is working instantly without changing any codes. If any of you have some info about server setup, please share. My old server is using LitespeedForum: Plugins
In reply to: [WooCommerce] Can’t update product using REST APII can confirm you that using Woocommerce can receive PUT command using curl:
curl -X PUT https://domain_name/wp-json/wc/v3/products/<<product_id>> \ -u <<customer_key>>:<<customer_secret>> \ -H "Content-Type: application/json" \ -d '{"stock_quantity": "70"}'
and quantity successfully changed to 70.
But I can’t do the same thing using Postman and place customer_key and customer_secret in url query like in https://woocommerce.github.io/woocommerce-rest-api-docs/?shell#authentication-over-https
Forum: Plugins
In reply to: [WooCommerce] Can’t update product using REST APIHi Paulo,
I already contacted my hosting provider regarding whether they block PUT request, but they don’t block it.Anything more that I should ask about?
How about authorization using url variables? is there any specific setting (maybe in .htaccess) to enable that?
Forum: Plugins
In reply to: [WooCommerce] Can’t update product using REST APII can confirm that curl command in the above screenshot is working.
And below code should present in .htaccess in my case:
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 RewriteRule ^wp-json/.* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
But I still have not succeed using Postman and also with consumer key and secret as url variables (https://domain_name/wp-json/wc/v3/products/<<product_id>>/?consumer_key=XXXXXXX&consumer_secret=XXXXXXX
Forum: Plugins
In reply to: [WooCommerce] Can’t update product using REST APII think there are problems on my whole Woocommerce REST API.
My call to GET wp-json/wc/v3/products also returning:
{"code":"woocommerce_rest_cannot_view","message":"Sorry, you cannot list resources.","data":{"status":401}}
GET wp-json/wc/v3/products doesn’t need any authorization, am I correct?
Forum: Plugins
In reply to: [WooCommerce] Can’t update product using REST APII tried to create new Woocommerce installation in the same server but only using Woocommerce plugin. Here is the status report:
### WordPress Environment ###WordPress address (URL): https://www.******************.id/test
Site address (URL): https://www.******************.id/test
WC Version: 6.5.1
REST API Version: ? 6.5.1
WC Blocks Version: ? 7.4.3
Action Scheduler Version: ? 3.4.0
Log Directory Writable: ?
WP Version: 6.0
WP Multisite: –
WP Memory Limit: 512 MB
WP Debug Mode: –
WP Cron: ?
Language: en_US
External object cache: –### Server Environment ###
Server Info: LiteSpeed
PHP Version: 7.4.29
PHP Post Max Size: 50 MB
PHP Time Limit: 300
PHP Max Input Vars: 1000
cURL Version: 7.29.0
NSS/3.53.1SUHOSIN Installed: –
MySQL Version: 5.5.5-10.3.27-MariaDB-cll-lve
Max Upload Size: 50 MB
Default Timezone is UTC: ?
fsockopen/cURL: ?
SoapClient: ?
DOMDocument: ?
GZip: ?
Multibyte String: ?
Remote Post: ?
Remote Get: ?### Database ###
WC Database Version: 6.5.1
WC Database Prefix: z8xm4n_
Total Database Size: 4.84MB
Database Data Size: 3.37MB
Database Index Size: 1.47MB
z8xm4n_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
z8xm4n_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
z8xm4n_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
z8xm4n_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
z8xm4n_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_actionscheduler_actions: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
z8xm4n_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
z8xm4n_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_options: Data: 2.44MB + Index: 0.06MB + Engine InnoDB
z8xm4n_postmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_posts: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
z8xm4n_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
z8xm4n_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
z8xm4n_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
z8xm4n_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
z8xm4n_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
z8xm4n_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
z8xm4n_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
z8xm4n_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
z8xm4n_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
z8xm4n_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB### Post Type Counts ###
attachment: 1
page: 7
post: 1
product: 1### Security ###
Secure connection (HTTPS): ?
Hide errors from visitors: ?### Active Plugins (1) ###
WooCommerce: by Automattic – 6.5.1
### Inactive Plugins (1) ###
Akismet Anti-Spam: by Automattic – 4.2.4
### Settings ###
API Enabled: ?
Force SSL: –
Currency: IDR (Rp)
Currency Position: left
Thousand Separator: .
Decimal Separator: ,
Number of Decimals: 0
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)Connected to WooCommerce.com: –
Enforce Approved Product Download Directories: ?### WC Pages ###
Shop base: #7 – /shop/
Cart: #8 – /cart/
Checkout: #9 – /checkout/
My account: #10 – /my-account/
Terms and conditions: ? Page not set### Theme ###
Name: Storefront
Version: 4.1.0
Author URL: https://woocommerce.com/
Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
WooCommerce Support: ?### Templates ###
Overrides: –
### Action Scheduler ###
Complete: 6
Oldest: 2022-06-09 14:11:04 +0000
Newest: 2022-06-09 14:22:33 +0000### Status report information ###
Generated at: 2022-06-09 14:26:48 +00:00
Same thing happen, when I call endpoint PUT https://domain_name/web_dir/wp-json/wc/v3/products/<<product_id>> it’ll return JSON data of the product.
But now I’m turning off Automatically follow redirects on my Postman and also turn off Permanent SEO-safe 301 redirect from HTTP to HTTPS in my Plesk’s hosting settings.
It turns out when I call the same endpoint, it’ll return 301 Moved Permanently.I tried other things like calling endpoint GET /wp-json/wc/v3/products/<<product_id>>, it will return:
{“code”:”woocommerce_rest_cannot_view”,”message”:”Sorry, you cannot list resources.”,”data”:{“status”:401}}’`
I tried using HTTP Auth Basic and also tried OAuth 1.0 with no success.
I also add this code in my .htaccess:
<IfModule mod_fcgid.c> RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] </IfModule>
What will it suggest any direction for debugging this problem?
It seems that something in my server’s setting make this problem…notes:
there is error but I don’t think it relevant with the problem:
.770659 [NOTICE] [3481905] [36.71.175.65:56180:HTTP2-91#APVH_*****.**:443] [STDERR] The Automattic\WooCommerce\Admin\API\Options::get_options function is deprecated since version 3.1.Forum: Plugins
In reply to: [WooCommerce] Can’t update product using REST APIyes, it’s happening with all product. All of them are simple products.
Any clue?
Forum: Plugins
In reply to: [WooCommerce] Can’t update product using REST APIOk, I tried to deactivate security plugins. Please find the updated status report:
### WordPress Environment ### WordPress address (URL): https://www.********.id Site address (URL): https://www.********.id WC Version: 6.5.1 REST API Version: ? 6.5.1 WC Blocks Version: ? 7.4.3 Action Scheduler Version: ? 3.4.0 Log Directory Writable: ? WP Version: 6.0 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ? Language: en_US External object cache: – ### Server Environment ### Server Info: LiteSpeed PHP Version: 7.4.29 PHP Post Max Size: 50 MB PHP Time Limit: 300 PHP Max Input Vars: 1000 cURL Version: 7.29.0 NSS/3.53.1 SUHOSIN Installed: – MySQL Version: 5.5.5-10.3.27-MariaDB-cll-lve Max Upload Size: 50 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 6.5.1 WC Database Prefix: qrtavad8r_ Total Database Size: 27.50MB Database Data Size: 23.97MB Database Index Size: 3.53MB qrtavad8r_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB qrtavad8r_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB qrtavad8r_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB qrtavad8r_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB qrtavad8r_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB cerber_acl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB cerber_blocks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB cerber_countries: Data: 0.02MB + Index: 0.00MB + Engine InnoDB cerber_lab: Data: 0.02MB + Index: 0.00MB + Engine InnoDB cerber_lab_ip: Data: 0.02MB + Index: 0.00MB + Engine InnoDB cerber_lab_net: Data: 0.02MB + Index: 0.02MB + Engine InnoDB cerber_log: Data: 0.02MB + Index: 0.05MB + Engine InnoDB cerber_qmem: Data: 0.02MB + Index: 0.02MB + Engine InnoDB cerber_traffic: Data: 1.52MB + Index: 0.05MB + Engine InnoDB qrtavad8r_actionscheduler_actions: Data: 0.06MB + Index: 0.13MB + Engine InnoDB qrtavad8r_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_actionscheduler_logs: Data: 0.05MB + Index: 0.03MB + Engine InnoDB qrtavad8r_cerber_files: Data: 0.02MB + Index: 0.00MB + Engine InnoDB qrtavad8r_cerber_sets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB qrtavad8r_cerber_uss: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB qrtavad8r_duplicator_packages: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_itsec_bans: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_itsec_dashboard_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_itsec_distributed_storage: Data: 7.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_itsec_fingerprints: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_itsec_geolocation_cache: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_itsec_lockouts: Data: 0.02MB + Index: 0.08MB + Engine InnoDB qrtavad8r_itsec_logs: Data: 3.50MB + Index: 0.11MB + Engine InnoDB qrtavad8r_itsec_mutexes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_itsec_opaque_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_itsec_temp: Data: 0.02MB + Index: 0.06MB + Engine InnoDB qrtavad8r_itsec_user_groups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB qrtavad8r_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_litespeed_url: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_litespeed_url_file: Data: 0.02MB + Index: 0.08MB + Engine InnoDB qrtavad8r_masterslider_options: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_masterslider_sliders: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_newsletter: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_newsletter_emails: Data: 0.02MB + Index: 0.00MB + Engine InnoDB qrtavad8r_newsletter_sent: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_newsletter_stats: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_newsletter_user_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB qrtavad8r_options: Data: 5.47MB + Index: 0.09MB + Engine InnoDB qrtavad8r_postmeta: Data: 1.52MB + Index: 0.55MB + Engine InnoDB qrtavad8r_posts: Data: 1.50MB + Index: 0.22MB + Engine InnoDB qrtavad8r_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_term_relationships: Data: 0.06MB + Index: 0.02MB + Engine InnoDB qrtavad8r_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_usermeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB qrtavad8r_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB qrtavad8r_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB qrtavad8r_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB qrtavad8r_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB qrtavad8r_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB qrtavad8r_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB qrtavad8r_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_wc_product_meta_lookup: Data: 0.05MB + Index: 0.09MB + Engine InnoDB qrtavad8r_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB qrtavad8r_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_wt_iew_action_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB qrtavad8r_wt_iew_cron: Data: 0.02MB + Index: 0.00MB + Engine InnoDB qrtavad8r_wt_iew_ftp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB qrtavad8r_wt_iew_mapping_template: Data: 0.02MB + Index: 0.00MB + Engine InnoDB qrtavad8r_yoast_indexable: Data: 1.52MB + Index: 0.33MB + Engine InnoDB qrtavad8r_yoast_indexable_hierarchy: Data: 0.08MB + Index: 0.05MB + Engine InnoDB qrtavad8r_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB qrtavad8r_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB qrtavad8r_yoast_seo_links: Data: 0.02MB + Index: 0.03MB + Engine InnoDB ### Post Type Counts ### attachment: 533 elementor_library: 1 itsec-dash-card: 6 itsec-dashboard: 1 ml-slide: 4 ml-slider: 1 nav_menu_item: 43 page: 13 post: 2 product: 174 revision: 110 shop_order: 3 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (17) ### Branda: by WPMU DEV – 3.4.7 Classic Editor: by WordPress Contributors – 1.6.2 Easy WP SMTP: by wpecommerce alexanderfoxc – 1.4.7 Site Kit by Google: by Google – 1.75.0 LiteSpeed Cache: by LiteSpeed Technologies – 4.6 Master Slider: by averta – 3.8.1 Midtrans - WooCommerce Payment Gateway: by Midtrans – 2.32.1 Newsletter: by Stefano Lissa & The Newsletter Team – 7.4.6 Payment Reminder: by Tonjoo Studio – 2.0.3 Plugin Konfirmasi Pembayaran: by Tonjoo Studio – 2.0.2 Plugin Ongkos Kirim: by Tonjoo Studio – 3.8.6 Plugin Refund: by Tonjoo Studio – 2.0.0 Plugin Resi: by Tonjoo Studio – 1.2.6 Storefront Add Slider: by Atlantis Themes – 0.4 Taxonomy Images: by Michael Fields Ben Huson – 1.0 WooCommerce: by Automattic – 6.5.1 Yoast SEO: by Team Yoast – 19.0 ### Inactive Plugins (8) ### Duplicator: by Snap Creek – 1.4.6 Email Test: by SiteAlert – 1.0.2 iThemes Security: by iThemes – 8.1.2 Max Mega Menu: by megamenu.com – 2.9.6 MetaSlider: by MetaSlider – 3.27.5 Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.5 UpdraftPlus - Backup/Restore: by UpdraftPlus.Com DavidAnderson – 1.22.12 WP Cerber Security, Anti-spam & Malware Scan: by Cerber Tech Inc. – 9.0 ### Dropin Plugins (1) ### maintenance.php: maintenance.php ### Settings ### API Enabled: ? Force SSL: – Currency: IDR (Rp) Currency Position: left_space Thousand Separator: . Decimal Separator: , Number of Decimals: 0 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – Enforce Approved Product Download Directories: – ### WC Pages ### Shop base: #15 - /shop/ Cart: #16 - /cart/ Checkout: #17 - /checkout/ My account: #18 - /account/ Terms and conditions: ? Page not set ### Theme ### Name: ********* ********* Version: 1.0.0 Author URL: https://childtheme-generator.com/ Child Theme: ? Parent Theme Name: Storefront Parent Theme Version: 4.1.0 Parent Theme Author URL: https://woocommerce.com/ WooCommerce Support: ? ### Templates ### Overrides: *********-*********/woocommerce/archive-product.php ### Action Scheduler ### Complete: 83 Oldest: 2022-05-09 14:05:55 +0700 Newest: 2022-06-09 09:54:48 +0700 ### Status report information ### Generated at: 2022-06-09 09:55:14 +07:00
But still can’t update the stock from REST API: /wp-json/wc/v3/products/<<product_id>>
- This reply was modified 2 years, 9 months ago by barotoardi.
- This reply was modified 2 years, 9 months ago by barotoardi.
Forum: Plugins
In reply to: [WooCommerce] Can’t update product using REST APIHi, tried without https:// still response product data but not updated.
Here is system report:
### WordPress Environment ###WordPress address (URL): https://www.*********
Site address (URL): https://www.*********
WC Version: 6.5.1
REST API Version: ? 6.5.1
WC Blocks Version: ? 7.4.3
Action Scheduler Version: ? 3.4.0
Log Directory Writable: ?
WP Version: 6.0
WP Multisite: –
WP Memory Limit: 512 MB
WP Debug Mode: –
WP Cron: ?
Language: en_US
External object cache: –### Server Environment ###
Server Info: LiteSpeed
PHP Version: 7.4.29
PHP Post Max Size: 50 MB
PHP Time Limit: 300
PHP Max Input Vars: 1000
cURL Version: 7.29.0
NSS/3.53.1SUHOSIN Installed: –
MySQL Version: 5.5.5-10.3.27-MariaDB-cll-lve
Max Upload Size: 50 MB
Default Timezone is UTC: ?
fsockopen/cURL: ?
SoapClient: ?
DOMDocument: ?
GZip: ?
Multibyte String: ?
Remote Post: ?
Remote Get: ?### Database ###
WC Database Version: 6.5.1
WC Database Prefix: qrtavad8r_
Total Database Size: 27.47MB
Database Data Size: 23.94MB
Database Index Size: 3.53MB
qrtavad8r_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
qrtavad8r_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
qrtavad8r_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
cerber_acl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
cerber_blocks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
cerber_countries: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
cerber_lab: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
cerber_lab_ip: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
cerber_lab_net: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
cerber_log: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
cerber_qmem: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
cerber_traffic: Data: 1.52MB + Index: 0.05MB + Engine InnoDB
qrtavad8r_actionscheduler_actions: Data: 0.06MB + Index: 0.13MB + Engine InnoDB
qrtavad8r_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_actionscheduler_logs: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_cerber_files: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_cerber_sets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_cerber_uss: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
qrtavad8r_duplicator_packages: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_itsec_bans: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_itsec_dashboard_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_itsec_distributed_storage: Data: 7.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_itsec_fingerprints: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_itsec_geolocation_cache: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_itsec_lockouts: Data: 0.02MB + Index: 0.08MB + Engine InnoDB
qrtavad8r_itsec_logs: Data: 3.50MB + Index: 0.11MB + Engine InnoDB
qrtavad8r_itsec_mutexes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_itsec_opaque_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_itsec_temp: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
qrtavad8r_itsec_user_groups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_litespeed_url: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_litespeed_url_file: Data: 0.02MB + Index: 0.08MB + Engine InnoDB
qrtavad8r_masterslider_options: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_masterslider_sliders: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_newsletter: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_newsletter_emails: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_newsletter_sent: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_newsletter_stats: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_newsletter_user_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_options: Data: 5.47MB + Index: 0.09MB + Engine InnoDB
qrtavad8r_postmeta: Data: 1.52MB + Index: 0.55MB + Engine InnoDB
qrtavad8r_posts: Data: 1.50MB + Index: 0.22MB + Engine InnoDB
qrtavad8r_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_term_relationships: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_usermeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
qrtavad8r_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
qrtavad8r_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
qrtavad8r_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_wc_product_meta_lookup: Data: 0.05MB + Index: 0.09MB + Engine InnoDB
qrtavad8r_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_wt_iew_action_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_wt_iew_cron: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_wt_iew_ftp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_wt_iew_mapping_template: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
qrtavad8r_yoast_indexable: Data: 1.52MB + Index: 0.33MB + Engine InnoDB
qrtavad8r_yoast_indexable_hierarchy: Data: 0.08MB + Index: 0.05MB + Engine InnoDB
qrtavad8r_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
qrtavad8r_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
qrtavad8r_yoast_seo_links: Data: 0.02MB + Index: 0.03MB + Engine InnoDB### Post Type Counts ###
attachment: 533
elementor_library: 1
itsec-dash-card: 6
itsec-dashboard: 1
ml-slide: 4
ml-slider: 1
nav_menu_item: 43
page: 13
post: 2
product: 174
revision: 109
shop_order: 3### Security ###
Secure connection (HTTPS): ?
Hide errors from visitors: ?### Active Plugins (19) ###
iThemes Security: by iThemes – 8.1.2
Branda: by WPMU DEV – 3.4.7
Classic Editor: by WordPress Contributors – 1.6.2
Easy WP SMTP: by wpecommerce
alexanderfoxc – 1.4.7Site Kit by Google: by Google – 1.75.0
LiteSpeed Cache: by LiteSpeed Technologies – 4.6
Master Slider: by averta – 3.8.1
Midtrans – WooCommerce Payment Gateway: by Midtrans – 2.32.1
Newsletter: by Stefano Lissa & The Newsletter Team – 7.4.6
Payment Reminder: by Tonjoo Studio – 2.0.3
Plugin Konfirmasi Pembayaran: by Tonjoo Studio – 2.0.2
Plugin Ongkos Kirim: by Tonjoo Studio – 3.8.6
Plugin Refund: by Tonjoo Studio – 2.0.0
Plugin Resi: by Tonjoo Studio – 1.2.6
Storefront Add Slider: by Atlantis Themes – 0.4
Taxonomy Images: by Michael Fields
Ben Huson – 1.0WooCommerce: by Automattic – 6.5.1
Yoast SEO: by Team Yoast – 18.9
WP Cerber Security, Anti-spam & Malware Scan: by Cerber Tech Inc. – 9.0### Inactive Plugins (6) ###
Duplicator: by Snap Creek – 1.4.6
Email Test: by SiteAlert – 1.0.2
Max Mega Menu: by megamenu.com – 2.9.6
MetaSlider: by MetaSlider – 3.27.5
Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.5
UpdraftPlus – Backup/Restore: by UpdraftPlus.Com
DavidAnderson – 1.22.12### Dropin Plugins (1) ###
maintenance.php: maintenance.php
### Settings ###
API Enabled: ?
Force SSL: –
Currency: IDR (Rp)
Currency Position: left_space
Thousand Separator: .
Decimal Separator: ,
Number of Decimals: 0
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)Connected to WooCommerce.com: –
Enforce Approved Product Download Directories: –### WC Pages ###
Shop base: #15 – /shop/
Cart: #16 – /cart/
Checkout: #17 – /checkout/
My account: #18 – /account/
Terms and conditions: ? Page not set### Theme ###
Name: ********* *********
Version: 1.0.0
Author URL: https://childtheme-generator.com/
Child Theme: ?
Parent Theme Name: Storefront
Parent Theme Version: 4.1.0
Parent Theme Author URL: https://woocommerce.com/
WooCommerce Support: ?### Templates ###
Overrides: *********-*********/woocommerce/archive-product.php
### Action Scheduler ###
Complete: 82
Oldest: 2022-05-09 14:05:55 +0700
Newest: 2022-06-07 15:32:56 +0700### Status report information ###
Generated at: 2022-06-08 15:31:47 +07:00
`Forum: Plugins
In reply to: [WooCommerce] Can’t update product using REST APII forgot to mention, when I try using curl to call woocommerce /wp-json/wc/v3/products/32 from my mac’s terminal, it’ll return 301 permanently moved page.
this is my curl script:
curl -X PUT https://domain_name/wp-json/wc/v3/products/32 \
-u ck_2b6c661ac5764d71f63c4ba60a4475bd6ebef7c6:cs_a09f45e6bfd74306ed6ec15be9f82cb59b01d95a\
-H “Content-Type: application/json” \
-d ‘{
“stock_quantity”: 21
}’`Forum: Plugins
In reply to: [Easy Taxonomy Images] Get the image URLI also need this one, so after checking the plugin file, I just use this code to get the image url:
if (is_category()) $term_id = get_query_var('cat'); elseif (is_tax()) { $current_term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy')); $term_id = $current_term->term_id; } elseif (is_single()) { $term_id = wp_get_post_terms( $post->ID, ##your specific taxonomy##, array("fields" => "ids") )[0]; } $taxonomy_image_url = get_option('taxonomy_featured_image_'.$term_id); echo $taxonomy_image_url;
Maybe this can help..
PS: I only use this code for taxonomy archive template and single template. Never tried in other template files