• Resolved simonsbs

    (@simonsbs)


    recently i started getting this error when accessing the rest_api on my site

    https://techlab.co.il/wp-json/wc/v3/products?consumer_key=###&consumer_secret=###

    <br />
    <b>Fatal error</b>: Uncaught Error: Call to a member function current_user_can_access_publicize_data() on null in /home/techlabcoil/public_html/wp-content/plugins/jetpack/_inc/lib/core-api/wpcom-fields/post-fields-publicize-connections.php:118
    Stack trace:
    #0 /home/techlabcoil/public_html/wp-content/plugins/jetpack/_inc/lib/core-api/wpcom-fields/post-fields-publicize-connections.php(136): WPCOM_REST_API_V2_Post_Publicize_Connections_Field->permission_check(28548)
    #1 /home/techlabcoil/public_html/wp-content/plugins/jetpack/_inc/lib/core-api/class-wpcom-rest-field-controller.php(116): WPCOM_REST_API_V2_Post_Publicize_Connections_Field->get_permission_check(Array, Object(WP_REST_Request))
    #2 /home/techlabcoil/public_html/wp-includes/rest-api/endpoints/class-wp-rest-controller.php(394): WPCOM_REST_API_V2_Field_Controller->get_for_response(Array, ‘jetpack_publici…’, Object(WP_REST_Request), ‘product’)
    #3 /home/techlabcoil/public_html/wp-content/plugins/woocommerce/includes/api/v2/class-wc-rest-products-v2-controller.php(166): WP_RE in <b>/home/techlabcoil/public_html/wp-content/plugins/jetpack/_inc/lib/core-api/wpcom-fields/post-fields-publicize-connections.php</b> on line <b>118</b><br />

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter simonsbs

    (@simonsbs)

    update, it seems that if i disable “jetpack” plugin the api starts to work again, but when i enable it, it stops

    I also experienced an error message similar to this, and disabling Jetpack “solved” the problem.

    Here was my error message: (replacing our identifying info with …)
    PHP Fatal error: Uncaught Error: Call to a member function get_image() on boolean in /home/vintahc4/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1828\nStack trace:\n#0 /home/vintahc4/public_html/wp-content/plugins/woocommerce/includes/admin/list-tables/class-wc-admin-list-table-products.php(145): WC_Product->get_image(‘thumbnail’)\n#1 …/wp-content/plugins/woocommerce/includes/admin/list-tables/abstract-class-wc-admin-list-table.php(261): WC_Admin_List_Table_Products->render_thumb_column()\n#2 …/wp-includes/class-wp-hook.php(286): WC_Admin_List_Table->render_columns(‘thumb’, 911)\n#3…/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array)\n#4…/wp-includes/plugin.php(453): WP_Hook->do_action(Array)\n#5 …/wp-admin/includes/class-wp-posts-list-table.php(1162): do_action(‘manage_product_…’, ‘thumb’, 911)\n#6 …/wp-admin/includes/clas in …/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php on line 1828, referer: …/wp-admin/edit.php?post_status=draft&post_type=product&paged=2

    I would like to be able to use Jetpack, hopefully this will save others the time it took to find a fix.

    Disabling Jetpack doesn’t feel like a solution, has anyone found a way to fix this issue while we’re waiting for an official solution?

    Try the solution proposed here in the meantime, it worked for me!

    Github

    I’m marking this as resolved since it is not a WooCommerce issue, but rather a Jetpack issue and is being addressed there.

    I am now experiencing the same error again, and jetpack is still disabled. Just popped up out of the blue, no plugin updates applied.
    Anyone else?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Call to a member function current_user_can_access_publicize_data()’ is closed to new replies.