Support » Plugin: Docket Cache - Object Cache Accelerator » WooCommerce update 403 Forbidden

  • Resolved kotyarashop

    (@kotyarashop)


    Hello.

    First topic. After some research I found that the error is related to your plugin.

    For two weeks now I’ve been playing around with the plugin settings to figure out which parameter is causing the error.
    The problem is that the error is visible only in the Query Monitor and occurs approximately once a day on the “Plugins” page.

    I use Query Monitor om site and few times got “HTTP API calls” error.
    WooCommerce version: 5.3.0

    Here full info from Query Monitor:

    Method
    POST

    URL

    https://woocommerce.com/wp-json/helper/1.0/update-check
    ?token=a239d2234e4fde0c1caac27e8999d6b0433f5ada
    &signature=e0d3f569e00f852be60ded212f2e3d189a7747828345bbdaf1a0c29554a43b40

    Status

    403 Forbidden
    HTTP API Transport: curl
    DNS resolution time: 0,0014
    Connection time: 0,0500
    Transmission start time (TTFB): 0,4933
    Answer size: 98 Б
    Response content type: application/json; charset=UTF-8
    IP Address: 192.0.66.5

    Call source

    WC_Helper_API::request()
    wp-content/plugins/woocommerce/includes/admin/helper/class-wc-helper-api.php:60
    WC_Helper_API::post()
    wp-content/plugins/woocommerce/includes/admin/helper/class-wc-helper-api.php:139
    WC_Helper_Updater::_update_check()
    wp-content/plugins/woocommerce/includes/admin/helper/class-wc-helper-updater.php:320
    WC_Helper_Updater::get_update_data()
    wp-content/plugins/woocommerce/includes/admin/helper/class-wc-helper-updater.php:169
    WC_Helper_Updater::transient_update_plugins()
    wp-content/plugins/woocommerce/includes/admin/helper/class-wc-helper-updater.php:40
    apply_filters('pre_set_site_transient_update_plugins')
    wp-includes/plugin.php:212
    set_site_transient()
    wp-includes/option.php:1931
    wp_update_plugins()
    wp-includes/update.php:354
    _maybe_update_plugins()
    wp-includes/update.php:820
    do_action('admin_init')
    wp-includes/plugin.php:484

    Component
    Plugin: woocommerce

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi @kotyarashop,

    Thanks for the report. I will try to replicate the issue and update once found the solutions.

    Meanwhile, if you enabled “Configuration -> Limit WP-Admin HTTP Requests” or “Configuration -> HTTP Request Expect header tweaks”, please try to disable it and see if that can solve this issue.

    Thanks.

    Thread Starter kotyarashop

    (@kotyarashop)

    Hello @nawawijamili

    Both options was disabled.

    Also there is mistake with “Prevent robots crawling add-to-cart links” option.
    Line User-agent: * is redundant because it repeats the first line of the file.

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    @kotyarashop noted with thanks.

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi, after debugging, it seems the issue is from WooCommerce, it failed to authenticate if a product is empty and assuming it related to the subscription.

    File: wp-content/plugins/woocommerce/includes/admin/helper/class-wc-helper-api.php
    Method: WC_Helper_API::request()
    Line: 44

    To debug, insert this code in WC_Helper_API::request()

    Code:

    
    file_put_contents(WP_CONTENT_DIR.'/WOODEBUG.txt', __METHOD__."\n".$url."\n".print_r($args,1)."\n", FILE_APPEND);
    

    Before:

    
        public static function request( $endpoint, $args = array() ) {
            $url = self::url( $endpoint );
    
            if ( ! empty( $args['authenticated'] ) ) {
                if ( ! self::_authenticate( $url, $args ) ) {
                    return new WP_Error( 'authentication', 'Authentication failed.' );
                }
    	    }
    
            /**
             * Allow developers to filter the request args passed to wp_safe_remote_request().
             * Useful to remove sslverify when working on a local api dev environment.
             */
    	    $args = apply_filters( 'woocommerce_helper_api_request_args', $args, $endpoint );
    
            // TODO: Check response signatures on certain endpoints.
            return wp_safe_remote_request( $url, $args );
        }
    

    After:

    
        public static function request( $endpoint, $args = array() ) {
            $url = self::url( $endpoint );
    
            if ( ! empty( $args['authenticated'] ) ) {
                if ( ! self::_authenticate( $url, $args ) ) {
                    file_put_contents(WP_CONTENT_DIR.'/WOODEBUG.txt', __METHOD__."\n".$url."\n".print_r($args,1)."\n", FILE_APPEND);
                    return new WP_Error( 'authentication', 'Authentication failed.' );
                }
    	    }
    
            /**
             * Allow developers to filter the request args passed to wp_safe_remote_request().
             * Useful to remove sslverify when working on a local api dev environment.
             */
    	    $args = apply_filters( 'woocommerce_helper_api_request_args', $args, $endpoint );
    
            // TODO: Check response signatures on certain endpoints.
            return wp_safe_remote_request( $url, $args );
        }
    

    wp-content/WOODEBUG.txt will shown content like below, if authentication failed:

    WC_Helper_API::request
    https://woocommerce.com/wp-json/helper/1.0/subscriptions
    Array
    (
        [authenticated] => 1
        [method] => GET
    )
    
    WC_Helper_API::request
    https://woocommerce.com/wp-json/helper/1.0/update-check
    Array
    (
        [body] => {"products":[]}
        [authenticated] => 1
        [method] => POST
    )

    To debug without Docket Cache activated. Install and activate Transient Manager, and remove _woocommerce_helper_updates.

    Thanks.

    Thread Starter kotyarashop

    (@kotyarashop)

    @nawawijamili
    Please tell me the details.

    1. How to do it?

    insert this code in WC_Helper_API::request()

    2. What does it mean “Before:” and “After:”? Where (and when) to insert this code?

    3. After that, open the wp-content/WOODEBUG.txt and send the text to you?

    4. Transient Manager – this plugin?

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    @kotyarashop

    1. Open file wp-content/plugins/woocommerce/includes/admin/helper/class-wc-helper-api.php using Plugin Editor.

    Plugins -> Plugin Editor.

    – Select plugin to edit: WooCommerce
    – And select includes -> admin -> helper -> class-wc-helper-api.php
    – Go to line 47 you can see this code:

    if ( ! empty( $args['authenticated'] ) ) {
    			if ( ! self::_authenticate( $url, $args ) ) {
    				return new WP_Error( 'authentication', 'Authentication failed.' );
    			}
    		}

    – Insert this code:
    file_put_contents(WP_CONTENT_DIR.'/WOODEBUG.txt',__METHOD__."\n".$url."\n".print_r($args,1)."\n", FILE_APPEND);

    – before this code

    
    return new WP_Error( 'authentication', 'Authentication failed.' );
    

    – It should look like this:

    
    file_put_contents(WP_CONTENT_DIR.'/WOODEBUG.txt',__METHOD__."\n".$url."\n".print_r($args,1)."\n", FILE_APPEND);
    return new WP_Error( 'authentication', 'Authentication failed.' );
    

    2. Before means the original code, After means edited code.

    3. If an error happens wp-content/WOODEBUG.txt should have the debug info, like this:

    WC_Helper_API::request
    https://woocommerce.com/wp-json/helper/1.0/subscriptions
    Array
    (
        [authenticated] => 1
        [method] => GET
    )
    
    WC_Helper_API::request
    https://woocommerce.com/wp-json/helper/1.0/update-check
    Array
    (
        [body] => {"products":[]}
        [authenticated] => 1
        [method] => POST
    )

    This debug info is prove that the issue is from WooCommerce not from Docket Cache.

    4. Yes.

    Thanks.

    Thread Starter kotyarashop

    (@kotyarashop)

    Thank you.
    I turned off Docket Cache plugin and now waiting for error.

    Thread Starter kotyarashop

    (@kotyarashop)

    The error occurred again.
    But the WOODEBUG.txt file did not appear.

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    you can try,

    go to line 59-60 and find this code

    
    // TODO: Check response signatures on certain endpoints.
    return wp_safe_remote_request( $url, $args );
    

    replace with

    
    // TODO: Check response signatures on certain endpoints.
    $response = wp_safe_remote_request( $url, $args );
    file_put_contents(WP_CONTENT_DIR.'/WOODEBUG.txt',__METHOD__."\n".$url."\n".print_r($args,1)."\n"."\n".print_r($response,1)."\n", FILE_APPEND);
    return $response;
    
    Thread Starter kotyarashop

    (@kotyarashop)

    @nawawijamili
    Thanks! File is below.

    WC_Helper_API::request
    https://woocommerce.com/wp-json/helper/1.0/subscriptions?token=a239d2234e4fde0c1caac27e8999d6b0433f5ada&signature=a3fa886a78b63d5b337a2f3555683088a02a1d5656b65ec489ef9ca8f5138a65
    Array
    (
        [authenticated] => 1
        [method] => GET
        [headers] => Array
            (
                [Authorization] => Bearer a239d2234e4fde0c1caac27e8999d6b0433f5ada
                [X-Woo-Signature] => a3fa886a78b63d5b337a2f3555683088a02a1d5656b65ec489ef9ca8f5138a65
            )
    
    )
    
    Array
    (
        [headers] => Requests_Utility_CaseInsensitiveDictionary Object
            (
                [data:protected] => Array
                    (
                        [server] => nginx
                        [date] => Wed, 02 Jun 2021 18:40:08 GMT
                        [content-type] => application/json; charset=UTF-8
                        [content-length] => 22
                        [x-robots-tag] => noindex
                        [link] => <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
                        [x-content-type-options] => nosniff
                        [access-control-expose-headers] => X-WP-Total, X-WP-TotalPages, Link
                        [access-control-allow-headers] => Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
                        [expires] => Wed, 11 Jan 1984 05:00:00 GMT
                        [cache-control] => no-cache, must-revalidate, max-age=0
                        [x-ratelimit-limit] => 300
                        [x-ratelimit-remaining] => 299
                        [x-ratelimit-reset] => 1622659800
                        [allow] => GET
                        [x-woo-signature] => 8e5d8eca14b6dad0b20280734ed9897f32252e1d
                        [content-encoding] => gzip
                        [x-rq] => arn1 87 111 3196
                        [age] => 0
                        [x-cache] => pass
                        [accept-ranges] => bytes
                    )
    
            )
    
        [body] => []
        [response] => Array
            (
                [code] => 200
                [message] => OK
            )
    
        [cookies] => Array
            (
            )
    
        [filename] => 
        [http_response] => WP_HTTP_Requests_Response Object
            (
                [response:protected] => Requests_Response Object
                    (
                        [body] => []
                        [raw] => HTTP/1.1 200 OK
    Server: nginx
    Date: Wed, 02 Jun 2021 18:40:08 GMT
    Content-Type: application/json; charset=UTF-8
    Content-Length: 22
    Connection: close
    X-Robots-Tag: noindex
    Link: <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
    X-Content-Type-Options: nosniff
    Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages, Link
    Access-Control-Allow-Headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    X-RateLimit-Limit: 300
    X-RateLimit-Remaining: 299
    X-RateLimit-Reset: 1622659800
    Allow: GET
    X-Woo-Signature: 8e5d8eca14b6dad0b20280734ed9897f32252e1d
    Content-Encoding: gzip
    X-rq: arn1 87 111 3196
    Age: 0
    X-Cache: pass
    Accept-Ranges: bytes
    
    []
                        [headers] => Requests_Response_Headers Object
                            (
                                [data:protected] => Array
                                    (
                                        [server] => Array
                                            (
                                                [0] => nginx
                                            )
    
                                        [date] => Array
                                            (
                                                [0] => Wed, 02 Jun 2021 18:40:08 GMT
                                            )
    
                                        [content-type] => Array
                                            (
                                                [0] => application/json; charset=UTF-8
                                            )
    
                                        [content-length] => Array
                                            (
                                                [0] => 22
                                            )
    
                                        [x-robots-tag] => Array
                                            (
                                                [0] => noindex
                                            )
    
                                        [link] => Array
                                            (
                                                [0] => <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
                                            )
    
                                        [x-content-type-options] => Array
                                            (
                                                [0] => nosniff
                                            )
    
                                        [access-control-expose-headers] => Array
                                            (
                                                [0] => X-WP-Total, X-WP-TotalPages, Link
                                            )
    
                                        [access-control-allow-headers] => Array
                                            (
                                                [0] => Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
                                            )
    
                                        [expires] => Array
                                            (
                                                [0] => Wed, 11 Jan 1984 05:00:00 GMT
                                            )
    
                                        [cache-control] => Array
                                            (
                                                [0] => no-cache, must-revalidate, max-age=0
                                            )
    
                                        [x-ratelimit-limit] => Array
                                            (
                                                [0] => 300
                                            )
    
                                        [x-ratelimit-remaining] => Array
                                            (
                                                [0] => 299
                                            )
    
                                        [x-ratelimit-reset] => Array
                                            (
                                                [0] => 1622659800
                                            )
    
                                        [allow] => Array
                                            (
                                                [0] => GET
                                            )
    
                                        [x-woo-signature] => Array
                                            (
                                                [0] => 8e5d8eca14b6dad0b20280734ed9897f32252e1d
                                            )
    
                                        [content-encoding] => Array
                                            (
                                                [0] => gzip
                                            )
    
                                        [x-rq] => Array
                                            (
                                                [0] => arn1 87 111 3196
                                            )
    
                                        [age] => Array
                                            (
                                                [0] => 0
                                            )
    
                                        [x-cache] => Array
                                            (
                                                [0] => pass
                                            )
    
                                        [accept-ranges] => Array
                                            (
                                                [0] => bytes
                                            )
    
                                    )
    
                            )
    
                        [status_code] => 200
                        [protocol_version] => 1.1
                        [success] => 1
                        [redirects] => 0
                        [url] => https://woocommerce.com/wp-json/helper/1.0/subscriptions?token=a239d2234e4fde0c1caac27e8999d6b0433f5ada&signature=a3fa886a78b63d5b337a2f3555683088a02a1d5656b65ec489ef9ca8f5138a65
                        [history] => Array
                            (
                            )
    
                        [cookies] => Requests_Cookie_Jar Object
                            (
                                [cookies:protected] => Array
                                    (
                                    )
    
                            )
    
                    )
    
                [filename:protected] => 
                [data] => 
                [headers] => 
                [status] => 
            )
    
    )
    
    WC_Helper_API::request
    https://woocommerce.com/wp-json/helper/1.0/update-check?token=a239d2234e4fde0c1caac27e8999d6b0433f5ada&signature=e0d3f569e00f852be60ded212f2e3d189a7747828345bbdaf1a0c29554a43b40
    Array
    (
        [body] => {"products":[]}
        [authenticated] => 1
        [method] => POST
        [headers] => Array
            (
                [Authorization] => Bearer a239d2234e4fde0c1caac27e8999d6b0433f5ada
                [X-Woo-Signature] => e0d3f569e00f852be60ded212f2e3d189a7747828345bbdaf1a0c29554a43b40
            )
    
    )
    
    Array
    (
        [headers] => Requests_Utility_CaseInsensitiveDictionary Object
            (
                [data:protected] => Array
                    (
                        [server] => nginx
                        [date] => Wed, 02 Jun 2021 18:40:08 GMT
                        [content-type] => application/json; charset=UTF-8
                        [x-robots-tag] => noindex
                        [link] => <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
                        [x-content-type-options] => nosniff
                        [access-control-expose-headers] => X-WP-Total, X-WP-TotalPages, Link
                        [access-control-allow-headers] => Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
                        [expires] => Wed, 11 Jan 1984 05:00:00 GMT
                        [cache-control] => no-cache, must-revalidate, max-age=0
                        [x-ratelimit-limit] => 300
                        [x-ratelimit-remaining] => 298
                        [x-ratelimit-reset] => 1622659800
                        [allow] => POST
                        [x-woo-signature] => a3ec34b9bb1f35b2bc8a61a5ef21124c863a8eb4
                        [content-encoding] => gzip
                        [x-rq] => arn1 87 176 3114
                        [age] => 0
                        [x-cache] => pass
                    )
    
            )
    
        [body] => {"code":"invalid_request","message":"Could not parse the request.","data":{"status":403}}
        [response] => Array
            (
                [code] => 403
                [message] => Forbidden
            )
    
        [cookies] => Array
            (
            )
    
        [filename] => 
        [http_response] => WP_HTTP_Requests_Response Object
            (
                [response:protected] => Requests_Response Object
                    (
                        [body] => {"code":"invalid_request","message":"Could not parse the request.","data":{"status":403}}
                        [raw] => HTTP/1.1 403 Forbidden
    Server: nginx
    Date: Wed, 02 Jun 2021 18:40:08 GMT
    Content-Type: application/json; charset=UTF-8
    Transfer-Encoding: chunked
    Connection: close
    X-Robots-Tag: noindex
    Link: <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
    X-Content-Type-Options: nosniff
    Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages, Link
    Access-Control-Allow-Headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    X-RateLimit-Limit: 300
    X-RateLimit-Remaining: 298
    X-RateLimit-Reset: 1622659800
    Allow: POST
    X-Woo-Signature: a3ec34b9bb1f35b2bc8a61a5ef21124c863a8eb4
    Content-Encoding: gzip
    X-rq: arn1 87 176 3114
    Age: 0
    X-Cache: pass
    
    {"code":"invalid_request","message":"Could not parse the request.","data":{"status":403}}
                        [headers] => Requests_Response_Headers Object
                            (
                                [data:protected] => Array
                                    (
                                        [server] => Array
                                            (
                                                [0] => nginx
                                            )
    
                                        [date] => Array
                                            (
                                                [0] => Wed, 02 Jun 2021 18:40:08 GMT
                                            )
    
                                        [content-type] => Array
                                            (
                                                [0] => application/json; charset=UTF-8
                                            )
    
                                        [x-robots-tag] => Array
                                            (
                                                [0] => noindex
                                            )
    
                                        [link] => Array
                                            (
                                                [0] => <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
                                            )
    
                                        [x-content-type-options] => Array
                                            (
                                                [0] => nosniff
                                            )
    
                                        [access-control-expose-headers] => Array
                                            (
                                                [0] => X-WP-Total, X-WP-TotalPages, Link
                                            )
    
                                        [access-control-allow-headers] => Array
                                            (
                                                [0] => Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
                                            )
    
                                        [expires] => Array
                                            (
                                                [0] => Wed, 11 Jan 1984 05:00:00 GMT
                                            )
    
                                        [cache-control] => Array
                                            (
                                                [0] => no-cache, must-revalidate, max-age=0
                                            )
    
                                        [x-ratelimit-limit] => Array
                                            (
                                                [0] => 300
                                            )
    
                                        [x-ratelimit-remaining] => Array
                                            (
                                                [0] => 298
                                            )
    
                                        [x-ratelimit-reset] => Array
                                            (
                                                [0] => 1622659800
                                            )
    
                                        [allow] => Array
                                            (
                                                [0] => POST
                                            )
    
                                        [x-woo-signature] => Array
                                            (
                                                [0] => a3ec34b9bb1f35b2bc8a61a5ef21124c863a8eb4
                                            )
    
                                        [content-encoding] => Array
                                            (
                                                [0] => gzip
                                            )
    
                                        [x-rq] => Array
                                            (
                                                [0] => arn1 87 176 3114
                                            )
    
                                        [age] => Array
                                            (
                                                [0] => 0
                                            )
    
                                        [x-cache] => Array
                                            (
                                                [0] => pass
                                            )
    
                                    )
    
                            )
    
                        [status_code] => 403
                        [protocol_version] => 1.1
                        [success] => 
                        [redirects] => 0
                        [url] => https://woocommerce.com/wp-json/helper/1.0/update-check?token=a239d2234e4fde0c1caac27e8999d6b0433f5ada&signature=e0d3f569e00f852be60ded212f2e3d189a7747828345bbdaf1a0c29554a43b40
                        [history] => Array
                            (
                            )
    
                        [cookies] => Requests_Cookie_Jar Object
                            (
                                [cookies:protected] => Array
                                    (
                                    )
    
                            )
    
                    )
    
                [filename:protected] => 
                [data] => 
                [headers] => 
                [status] => 
            )
    
    )
    
    WC_Helper_API::request
    https://woocommerce.com/wp-json/helper/1.0/subscriptions?token=a239d2234e4fde0c1caac27e8999d6b0433f5ada&signature=a3fa886a78b63d5b337a2f3555683088a02a1d5656b65ec489ef9ca8f5138a65
    Array
    (
        [authenticated] => 1
        [method] => GET
        [headers] => Array
            (
                [Authorization] => Bearer a239d2234e4fde0c1caac27e8999d6b0433f5ada
                [X-Woo-Signature] => a3fa886a78b63d5b337a2f3555683088a02a1d5656b65ec489ef9ca8f5138a65
            )
    
    )
    
    Array
    (
        [headers] => Requests_Utility_CaseInsensitiveDictionary Object
            (
                [data:protected] => Array
                    (
                        [server] => nginx
                        [date] => Thu, 03 Jun 2021 03:12:28 GMT
                        [content-type] => application/json; charset=UTF-8
                        [content-length] => 22
                        [x-robots-tag] => noindex
                        [link] => <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
                        [x-content-type-options] => nosniff
                        [access-control-expose-headers] => X-WP-Total, X-WP-TotalPages, Link
                        [access-control-allow-headers] => Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
                        [expires] => Wed, 11 Jan 1984 05:00:00 GMT
                        [cache-control] => no-cache, must-revalidate, max-age=0
                        [x-ratelimit-limit] => 300
                        [x-ratelimit-remaining] => 299
                        [x-ratelimit-reset] => 1622690400
                        [allow] => GET
                        [x-woo-signature] => 8e5d8eca14b6dad0b20280734ed9897f32252e1d
                        [content-encoding] => gzip
                        [x-rq] => arn1 87 176 3114
                        [age] => 0
                        [x-cache] => pass
                        [accept-ranges] => bytes
                    )
    
            )
    
        [body] => []
        [response] => Array
            (
                [code] => 200
                [message] => OK
            )
    
        [cookies] => Array
            (
            )
    
        [filename] => 
        [http_response] => WP_HTTP_Requests_Response Object
            (
                [response:protected] => Requests_Response Object
                    (
                        [body] => []
                        [raw] => HTTP/1.1 200 OK
    Server: nginx
    Date: Thu, 03 Jun 2021 03:12:28 GMT
    Content-Type: application/json; charset=UTF-8
    Content-Length: 22
    Connection: close
    X-Robots-Tag: noindex
    Link: <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
    X-Content-Type-Options: nosniff
    Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages, Link
    Access-Control-Allow-Headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    X-RateLimit-Limit: 300
    X-RateLimit-Remaining: 299
    X-RateLimit-Reset: 1622690400
    Allow: GET
    X-Woo-Signature: 8e5d8eca14b6dad0b20280734ed9897f32252e1d
    Content-Encoding: gzip
    X-rq: arn1 87 176 3114
    Age: 0
    X-Cache: pass
    Accept-Ranges: bytes
    
    []
                        [headers] => Requests_Response_Headers Object
                            (
                                [data:protected] => Array
                                    (
                                        [server] => Array
                                            (
                                                [0] => nginx
                                            )
    
                                        [date] => Array
                                            (
                                                [0] => Thu, 03 Jun 2021 03:12:28 GMT
                                            )
    
                                        [content-type] => Array
                                            (
                                                [0] => application/json; charset=UTF-8
                                            )
    
                                        [content-length] => Array
                                            (
                                                [0] => 22
                                            )
    
                                        [x-robots-tag] => Array
                                            (
                                                [0] => noindex
                                            )
    
                                        [link] => Array
                                            (
                                                [0] => <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
                                            )
    
                                        [x-content-type-options] => Array
                                            (
                                                [0] => nosniff
                                            )
    
                                        [access-control-expose-headers] => Array
                                            (
                                                [0] => X-WP-Total, X-WP-TotalPages, Link
                                            )
    
                                        [access-control-allow-headers] => Array
                                            (
                                                [0] => Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
                                            )
    
                                        [expires] => Array
                                            (
                                                [0] => Wed, 11 Jan 1984 05:00:00 GMT
                                            )
    
                                        [cache-control] => Array
                                            (
                                                [0] => no-cache, must-revalidate, max-age=0
                                            )
    
                                        [x-ratelimit-limit] => Array
                                            (
                                                [0] => 300
                                            )
    
                                        [x-ratelimit-remaining] => Array
                                            (
                                                [0] => 299
                                            )
    
                                        [x-ratelimit-reset] => Array
                                            (
                                                [0] => 1622690400
                                            )
    
                                        [allow] => Array
                                            (
                                                [0] => GET
                                            )
    
                                        [x-woo-signature] => Array
                                            (
                                                [0] => 8e5d8eca14b6dad0b20280734ed9897f32252e1d
                                            )
    
                                        [content-encoding] => Array
                                            (
                                                [0] => gzip
                                            )
    
                                        [x-rq] => Array
                                            (
                                                [0] => arn1 87 176 3114
                                            )
    
                                        [age] => Array
                                            (
                                                [0] => 0
                                            )
    
                                        [x-cache] => Array
                                            (
                                                [0] => pass
                                            )
    
                                        [accept-ranges] => Array
                                            (
                                                [0] => bytes
                                            )
    
                                    )
    
                            )
    
                        [status_code] => 200
                        [protocol_version] => 1.1
                        [success] => 1
                        [redirects] => 0
                        [url] => https://woocommerce.com/wp-json/helper/1.0/subscriptions?token=a239d2234e4fde0c1caac27e8999d6b0433f5ada&signature=a3fa886a78b63d5b337a2f3555683088a02a1d5656b65ec489ef9ca8f5138a65
                        [history] => Array
                            (
                            )
    
                        [cookies] => Requests_Cookie_Jar Object
                            (
                                [cookies:protected] => Array
                                    (
                                    )
    
                            )
    
                    )
    
                [filename:protected] => 
                [data] => 
                [headers] => 
                [status] => 
            )
    
    )
    
    WC_Helper_API::request
    https://woocommerce.com/wp-json/helper/1.0/subscriptions?token=a239d2234e4fde0c1caac27e8999d6b0433f5ada&signature=a3fa886a78b63d5b337a2f3555683088a02a1d5656b65ec489ef9ca8f5138a65
    Array
    (
        [authenticated] => 1
        [method] => GET
        [headers] => Array
            (
                [Authorization] => Bearer a239d2234e4fde0c1caac27e8999d6b0433f5ada
                [X-Woo-Signature] => a3fa886a78b63d5b337a2f3555683088a02a1d5656b65ec489ef9ca8f5138a65
            )
    
    )
    
    Array
    (
        [headers] => Requests_Utility_CaseInsensitiveDictionary Object
            (
                [data:protected] => Array
                    (
                        [server] => nginx
                        [date] => Thu, 03 Jun 2021 05:33:00 GMT
                        [content-type] => application/json; charset=UTF-8
                        [content-length] => 22
                        [x-robots-tag] => noindex
                        [link] => <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
                        [x-content-type-options] => nosniff
                        [access-control-expose-headers] => X-WP-Total, X-WP-TotalPages, Link
                        [access-control-allow-headers] => Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
                        [expires] => Wed, 11 Jan 1984 05:00:00 GMT
                        [cache-control] => no-cache, must-revalidate, max-age=0
                        [x-ratelimit-limit] => 300
                        [x-ratelimit-remaining] => 299
                        [x-ratelimit-reset] => 1622698800
                        [allow] => GET
                        [x-woo-signature] => 8e5d8eca14b6dad0b20280734ed9897f32252e1d
                        [content-encoding] => gzip
                        [x-rq] => arn1 91 142 3184
                        [age] => 0
                        [x-cache] => pass
                        [accept-ranges] => bytes
                    )
    
            )
    
        [body] => []
        [response] => Array
            (
                [code] => 200
                [message] => OK
            )
    
        [cookies] => Array
            (
            )
    
        [filename] => 
        [http_response] => WP_HTTP_Requests_Response Object
            (
                [response:protected] => Requests_Response Object
                    (
                        [body] => []
                        [raw] => HTTP/1.1 200 OK
    Server: nginx
    Date: Thu, 03 Jun 2021 05:33:00 GMT
    Content-Type: application/json; charset=UTF-8
    Content-Length: 22
    Connection: close
    X-Robots-Tag: noindex
    Link: <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
    X-Content-Type-Options: nosniff
    Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages, Link
    Access-Control-Allow-Headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    X-RateLimit-Limit: 300
    X-RateLimit-Remaining: 299
    X-RateLimit-Reset: 1622698800
    Allow: GET
    X-Woo-Signature: 8e5d8eca14b6dad0b20280734ed9897f32252e1d
    Content-Encoding: gzip
    X-rq: arn1 91 142 3184
    Age: 0
    X-Cache: pass
    Accept-Ranges: bytes
    
    []
                        [headers] => Requests_Response_Headers Object
                            (
                                [data:protected] => Array
                                    (
                                        [server] => Array
                                            (
                                                [0] => nginx
                                            )
    
                                        [date] => Array
                                            (
                                                [0] => Thu, 03 Jun 2021 05:33:00 GMT
                                            )
    
                                        [content-type] => Array
                                            (
                                                [0] => application/json; charset=UTF-8
                                            )
    
                                        [content-length] => Array
                                            (
                                                [0] => 22
                                            )
    
                                        [x-robots-tag] => Array
                                            (
                                                [0] => noindex
                                            )
    
                                        [link] => Array
                                            (
                                                [0] => <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
                                            )
    
                                        [x-content-type-options] => Array
                                            (
                                                [0] => nosniff
                                            )
    
                                        [access-control-expose-headers] => Array
                                            (
                                                [0] => X-WP-Total, X-WP-TotalPages, Link
                                            )
    
                                        [access-control-allow-headers] => Array
                                            (
                                                [0] => Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
                                            )
    
                                        [expires] => Array
                                            (
                                                [0] => Wed, 11 Jan 1984 05:00:00 GMT
                                            )
    
                                        [cache-control] => Array
                                            (
                                                [0] => no-cache, must-revalidate, max-age=0
                                            )
    
                                        [x-ratelimit-limit] => Array
                                            (
                                                [0] => 300
                                            )
    
                                        [x-ratelimit-remaining] => Array
                                            (
                                                [0] => 299
                                            )
    
                                        [x-ratelimit-reset] => Array
                                            (
                                                [0] => 1622698800
                                            )
    
                                        [allow] => Array
                                            (
                                                [0] => GET
                                            )
    
                                        [x-woo-signature] => Array
                                            (
                                                [0] => 8e5d8eca14b6dad0b20280734ed9897f32252e1d
                                            )
    
                                        [content-encoding] => Array
                                            (
                                                [0] => gzip
                                            )
    
                                        [x-rq] => Array
                                            (
                                                [0] => arn1 91 142 3184
                                            )
    
                                        [age] => Array
                                            (
                                                [0] => 0
                                            )
    
                                        [x-cache] => Array
                                            (
                                                [0] => pass
                                            )
    
                                        [accept-ranges] => Array
                                            (
                                                [0] => bytes
                                            )
    
                                    )
    
                            )
    
                        [status_code] => 200
                        [protocol_version] => 1.1
                        [success] => 1
                        [redirects] => 0
                        [url] => https://woocommerce.com/wp-json/helper/1.0/subscriptions?token=a239d2234e4fde0c1caac27e8999d6b0433f5ada&signature=a3fa886a78b63d5b337a2f3555683088a02a1d5656b65ec489ef9ca8f5138a65
                        [history] => Array
                            (
                            )
    
                        [cookies] => Requests_Cookie_Jar Object
                            (
                                [cookies:protected] => Array
                                    (
                                    )
    
                            )
    
                    )
    
                [filename:protected] => 
                [data] => 
                [headers] => 
                [status] => 
            )
    
    )
    
    WC_Helper_API::request
    https://woocommerce.com/wp-json/helper/1.0/subscriptions?token=a239d2234e4fde0c1caac27e8999d6b0433f5ada&signature=a3fa886a78b63d5b337a2f3555683088a02a1d5656b65ec489ef9ca8f5138a65
    Array
    (
        [authenticated] => 1
        [method] => GET
        [headers] => Array
            (
                [Authorization] => Bearer a239d2234e4fde0c1caac27e8999d6b0433f5ada
                [X-Woo-Signature] => a3fa886a78b63d5b337a2f3555683088a02a1d5656b65ec489ef9ca8f5138a65
            )
    
    )
    
    Array
    (
        [headers] => Requests_Utility_CaseInsensitiveDictionary Object
            (
                [data:protected] => Array
                    (
                        [server] => nginx
                        [date] => Thu, 03 Jun 2021 05:51:35 GMT
                        [content-type] => application/json; charset=UTF-8
                        [content-length] => 22
                        [x-robots-tag] => noindex
                        [link] => <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
                        [x-content-type-options] => nosniff
                        [access-control-expose-headers] => X-WP-Total, X-WP-TotalPages, Link
                        [access-control-allow-headers] => Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
                        [expires] => Wed, 11 Jan 1984 05:00:00 GMT
                        [cache-control] => no-cache, must-revalidate, max-age=0
                        [x-ratelimit-limit] => 300
                        [x-ratelimit-remaining] => 299
                        [x-ratelimit-reset] => 1622700000
                        [allow] => GET
                        [x-woo-signature] => 8e5d8eca14b6dad0b20280734ed9897f32252e1d
                        [content-encoding] => gzip
                        [x-rq] => arn2 86 193 3149
                        [age] => 0
                        [x-cache] => pass
                        [accept-ranges] => bytes
                    )
    
            )
    
        [body] => []
        [response] => Array
            (
                [code] => 200
                [message] => OK
            )
    
        [cookies] => Array
            (
            )
    
        [filename] => 
        [http_response] => WP_HTTP_Requests_Response Object
            (
                [response:protected] => Requests_Response Object
                    (
                        [body] => []
                        [raw] => HTTP/1.1 200 OK
    Server: nginx
    Date: Thu, 03 Jun 2021 05:51:35 GMT
    Content-Type: application/json; charset=UTF-8
    Content-Length: 22
    Connection: close
    X-Robots-Tag: noindex
    Link: <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
    X-Content-Type-Options: nosniff
    Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages, Link
    Access-Control-Allow-Headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    X-RateLimit-Limit: 300
    X-RateLimit-Remaining: 299
    X-RateLimit-Reset: 1622700000
    Allow: GET
    X-Woo-Signature: 8e5d8eca14b6dad0b20280734ed9897f32252e1d
    Content-Encoding: gzip
    X-rq: arn2 86 193 3149
    Age: 0
    X-Cache: pass
    Accept-Ranges: bytes
    
    []
                        [headers] => Requests_Response_Headers Object
                            (
                                [data:protected] => Array
                                    (
                                        [server] => Array
                                            (
                                                [0] => nginx
                                            )
    
                                        [date] => Array
                                            (
                                                [0] => Thu, 03 Jun 2021 05:51:35 GMT
                                            )
    
                                        [content-type] => Array
                                            (
                                                [0] => application/json; charset=UTF-8
                                            )
    
                                        [content-length] => Array
                                            (
                                                [0] => 22
                                            )
    
                                        [x-robots-tag] => Array
                                            (
                                                [0] => noindex
                                            )
    
                                        [link] => Array
                                            (
                                                [0] => <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
                                            )
    
                                        [x-content-type-options] => Array
                                            (
                                                [0] => nosniff
                                            )
    
                                        [access-control-expose-headers] => Array
                                            (
                                                [0] => X-WP-Total, X-WP-TotalPages, Link
                                            )
    
                                        [access-control-allow-headers] => Array
                                            (
                                                [0] => Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
                                            )
    
                                        [expires] => Array
                                            (
                                                [0] => Wed, 11 Jan 1984 05:00:00 GMT
                                            )
    
                                        [cache-control] => Array
                                            (
                                                [0] => no-cache, must-revalidate, max-age=0
                                            )
    
                                        [x-ratelimit-limit] => Array
                                            (
                                                [0] => 300
                                            )
    
                                        [x-ratelimit-remaining] => Array
                                            (
                                                [0] => 299
                                            )
    
                                        [x-ratelimit-reset] => Array
                                            (
                                                [0] => 1622700000
                                            )
    
                                        [allow] => Array
                                            (
                                                [0] => GET
                                            )
    
                                        [x-woo-signature] => Array
                                            (
                                                [0] => 8e5d8eca14b6dad0b20280734ed9897f32252e1d
                                            )
    
                                        [content-encoding] => Array
                                            (
                                                [0] => gzip
                                            )
    
                                        [x-rq] => Array
                                            (
                                                [0] => arn2 86 193 3149
                                            )
    
                                        [age] => Array
                                            (
                                                [0] => 0
                                            )
    
                                        [x-cache] => Array
                                            (
                                                [0] => pass
                                            )
    
                                        [accept-ranges] => Array
                                            (
                                                [0] => bytes
                                            )
    
                                    )
    
                            )
    
                        [status_code] => 200
                        [protocol_version] => 1.1
                        [success] => 1
                        [redirects] => 0
                        [url] => https://woocommerce.com/wp-json/helper/1.0/subscriptions?token=a239d2234e4fde0c1caac27e8999d6b0433f5ada&signature=a3fa886a78b63d5b337a2f3555683088a02a1d5656b65ec489ef9ca8f5138a65
                        [history] => Array
                            (
                            )
    
                        [cookies] => Requests_Cookie_Jar Object
                            (
                                [cookies:protected] => Array
                                    (
                                    )
    
                            )
    
                    )
    
                [filename:protected] => 
                [data] => 
                [headers] => 
                [status] => 
            )
    
    )
    
    WC_Helper_API::request
    https://woocommerce.com/wp-json/helper/1.0/update-check?token=a239d2234e4fde0c1caac27e8999d6b0433f5ada&signature=e0d3f569e00f852be60ded212f2e3d189a7747828345bbdaf1a0c29554a43b40
    Array
    (
        [body] => {"products":[]}
        [authenticated] => 1
        [method] => POST
        [headers] => Array
            (
                [Authorization] => Bearer a239d2234e4fde0c1caac27e8999d6b0433f5ada
                [X-Woo-Signature] => e0d3f569e00f852be60ded212f2e3d189a7747828345bbdaf1a0c29554a43b40
            )
    
    )
    
    Array
    (
        [headers] => Requests_Utility_CaseInsensitiveDictionary Object
            (
                [data:protected] => Array
                    (
                        [server] => nginx
                        [date] => Thu, 03 Jun 2021 05:51:35 GMT
                        [content-type] => application/json; charset=UTF-8
                        [content-length] => 98
                        [x-robots-tag] => noindex
                        [link] => <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
                        [x-content-type-options] => nosniff
                        [access-control-expose-headers] => X-WP-Total, X-WP-TotalPages, Link
                        [access-control-allow-headers] => Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
                        [expires] => Wed, 11 Jan 1984 05:00:00 GMT
                        [cache-control] => no-cache, must-revalidate, max-age=0
                        [x-ratelimit-limit] => 300
                        [x-ratelimit-remaining] => 298
                        [x-ratelimit-reset] => 1622700000
                        [allow] => POST
                        [x-woo-signature] => a3ec34b9bb1f35b2bc8a61a5ef21124c863a8eb4
                        [content-encoding] => gzip
                        [x-rq] => arn1 89 77 3174
                        [age] => 0
                        [x-cache] => pass
                    )
    
            )
    
        [body] => {"code":"invalid_request","message":"Could not parse the request.","data":{"status":403}}
        [response] => Array
            (
                [code] => 403
                [message] => Forbidden
            )
    
        [cookies] => Array
            (
            )
    
        [filename] => 
        [http_response] => WP_HTTP_Requests_Response Object
            (
                [response:protected] => Requests_Response Object
                    (
                        [body] => {"code":"invalid_request","message":"Could not parse the request.","data":{"status":403}}
                        [raw] => HTTP/1.1 403 Forbidden
    Server: nginx
    Date: Thu, 03 Jun 2021 05:51:35 GMT
    Content-Type: application/json; charset=UTF-8
    Content-Length: 98
    Connection: close
    X-Robots-Tag: noindex
    Link: <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
    X-Content-Type-Options: nosniff
    Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages, Link
    Access-Control-Allow-Headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    X-RateLimit-Limit: 300
    X-RateLimit-Remaining: 298
    X-RateLimit-Reset: 1622700000
    Allow: POST
    X-Woo-Signature: a3ec34b9bb1f35b2bc8a61a5ef21124c863a8eb4
    Content-Encoding: gzip
    X-rq: arn1 89 77 3174
    Age: 0
    X-Cache: pass
    
    {"code":"invalid_request","message":"Could not parse the request.","data":{"status":403}}
                        [headers] => Requests_Response_Headers Object
                            (
                                [data:protected] => Array
                                    (
                                        [server] => Array
                                            (
                                                [0] => nginx
                                            )
    
                                        [date] => Array
                                            (
                                                [0] => Thu, 03 Jun 2021 05:51:35 GMT
                                            )
    
                                        [content-type] => Array
                                            (
                                                [0] => application/json; charset=UTF-8
                                            )
    
                                        [content-length] => Array
                                            (
                                                [0] => 98
                                            )
    
                                        [x-robots-tag] => Array
                                            (
                                                [0] => noindex
                                            )
    
                                        [link] => Array
                                            (
                                                [0] => <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
                                            )
    
                                        [x-content-type-options] => Array
                                            (
                                                [0] => nosniff
                                            )
    
                                        [access-control-expose-headers] => Array
                                            (
                                                [0] => X-WP-Total, X-WP-TotalPages, Link
                                            )
    
                                        [access-control-allow-headers] => Array
                                            (
                                                [0] => Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
                                            )
    
                                        [expires] => Array
                                            (
                                                [0] => Wed, 11 Jan 1984 05:00:00 GMT
                                            )
    
                                        [cache-control] => Array
                                            (
                                                [0] => no-cache, must-revalidate, max-age=0
                                            )
    
                                        [x-ratelimit-limit] => Array
                                            (
                                                [0] => 300
                                            )
    
                                        [x-ratelimit-remaining] => Array
                                            (
                                                [0] => 298
                                            )
    
                                        [x-ratelimit-reset] => Array
                                            (
                                                [0] => 1622700000
                                            )
    
                                        [allow] => Array
                                            (
                                                [0] => POST
                                            )
    
                                        [x-woo-signature] => Array
                                            (
                                                [0] => a3ec34b9bb1f35b2bc8a61a5ef21124c863a8eb4
                                            )
    
                                        [content-encoding] => Array
                                            (
                                                [0] => gzip
                                            )
    
                                        [x-rq] => Array
                                            (
                                                [0] => arn1 89 77 3174
                                            )
    
                                        [age] => Array
                                            (
                                                [0] => 0
                                            )
    
                                        [x-cache] => Array
                                            (
                                                [0] => pass
                                            )
    
                                    )
    
                            )
    
                        [status_code] => 403
                        [protocol_version] => 1.1
                        [success] => 
                        [redirects] => 0
                        [url] => https://woocommerce.com/wp-json/helper/1.0/update-check?token=a239d2234e4fde0c1caac27e8999d6b0433f5ada&signature=e0d3f569e00f852be60ded212f2e3d189a7747828345bbdaf1a0c29554a43b40
                        [history] => Array
                            (
                            )
    
                        [cookies] => Requests_Cookie_Jar Object
                            (
                                [cookies:protected] => Array
                                    (
                                    )
    
                            )
    
                    )
    
                [filename:protected] => 
                [data] => 
                [headers] => 
                [status] => 
            )
    
    )
    
    
    Plugin Author Nawawi Jamili

    (@nawawijamili)

    @kotyarashop

    As you can see, this issue “WooCommerce update 403 Forbidden” is not related to Docket Cache. WooCommerce site can’t parse the data.

    
    Server: nginx
    Date: Thu, 03 Jun 2021 05:51:35 GMT
    Content-Type: application/json; charset=UTF-8
    Content-Length: 98
    Connection: close
    X-Robots-Tag: noindex
    Link: <https://woocommerce.com/wp-json/>; rel="https://api.w.org/"
    X-Content-Type-Options: nosniff
    Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages, Link
    Access-Control-Allow-Headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    X-RateLimit-Limit: 300
    X-RateLimit-Remaining: 298
    X-RateLimit-Reset: 1622700000
    Allow: POST
    X-Woo-Signature: a3ec34b9bb1f35b2bc8a61a5ef21124c863a8eb4
    Content-Encoding: gzip
    X-rq: arn1 89 77 3174
    Age: 0
    X-Cache: pass
    
    {"code":"invalid_request","message":"Could not parse the request.","data":{"status":403}}
    
    

    That all I can help.

    Thanks.

    Thread Starter kotyarashop

    (@kotyarashop)

    Thank you very much!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘WooCommerce update 403 Forbidden’ is closed to new replies.