• Resolved sebacastelao

    (@sebacastelao)


    It is possible to use the inventory synchronization functionality if my country is not within the following:

    WooCommerce Square is currently only available for the U.S., Canada, Australia, Japan and the UK.

    The functionality of receiving payments is not necessary for this project, it is only important that the synchronization of inventory work.

    The tests performed so far were satisfactory for the product name, price and other data in manually sync but not the inventory.

    My location is in Buenos Aires Argentina, I understand that the plugin is not compatible for payment processing, but the rest of the system is compatible and functional.

    This line of code indicate this error:

    body: Array
    (
    [errors] => Array
    (
    [0] => stdClass Object
    (
    [category] => INVALID_REQUEST_ERROR
    [code] => NOT_FOUND
    [detail] => This merchant does not have a location with the ID .
    )

    )

    )

    03-08-2020 @ 10:38:10 - Failed step cycle: pull_inventory (0.29s) - [NOT_FOUND] This merchant does not have a location with the ID .
    03-08-2020 @ 10:38:10 - [NOT_FOUND] This merchant does not have a location with the ID .

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter sebacastelao

    (@sebacastelao)

    I could fixed replacing this line in settings.php

    public function get_form_fields() {

    $fields = parent::get_form_fields();

    if ( ! empty( $fields[‘location_id’] ) ) {

    $locations = [
    ” => __( ‘Please choose a location’, ‘woocommerce-square’ ),
    ];

    if ( ! empty( $this->get_locations() ) ) {

    foreach ( $this->get_locations() as $location ) {

    // Original line
    // if ( ‘ACTIVE’ === $location->getStatus() && in_array( ‘CREDIT_CARD_PROCESSING’, (array) $location->getCapabilities(), true ) ) {

    // Custom line
    if ( ‘ACTIVE’ === $location->getStatus() ) {
    $locations[ $location->getId() ] = $location->getName();
    }
    }
    }

    $fields[‘location_id’][‘options’] = $locations;
    }

    return $fields;
    }

    is possible to change this in functions.php ?

    Plugin Support Elvira K. a11n

    (@treibalen)

    Hi there @sebacastelao,

    I apologize for the late reply!

    You’re right that at the moment only locations with active card processing can take advantage of the inventory sync feature.

    We do have an Enhancement request logged for our developers to consider changing that and I most definitely added your comment there to show demand for this feature.

    Please keep an eye on Square changelog to see if it’s added in the future releases.

    Meanwhile, feel free to customize the plugin’s code depending on your needs, however, please note that these changes won’t be update safe.

    Enjoy the rest of your week and stay safe!

    Plugin Support Elvira K. a11n

    (@treibalen)

    Hi there @sebacastelao,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Product Inventory Sync’ is closed to new replies.