Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thanks @mosesmedh, we have a solution now thanks to the WP support team.

    They suggested changing line 123 of includes/api-request/class-wc-shipstation-api-shipnotify.php with:

    return absint(apply_filters( 'woocommerce_shipstation_get_order_id', $order_id ));

    I also have the following filter in the theme to find the correct order ID based on the custom order number:

    add_filter( 'woocommerce_shipstation_get_order_id', function( $order_id ) {
    global $wpdb;

    $prepare_query = $wpdb->prepare(
    "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = '_alg_wc_full_custom_order_number' AND meta_value = %s",
    $order_id
    );

    $get_values = $wpdb->get_col( $prepare_query );

    return ! empty( $get_values ) ? absint( $get_values[0] ) : absint( $order_id );
    });

    With both of those in place, orders are now being updated once they are shipped in Shipstation.

    Can that fix be applied to the next version of the plugin?

    • This reply was modified 1 year, 2 months ago by calebgittins.

    Hi @woonami, what was the outcome to this? We are having a similar issue currently, but running v4.4.3 of the plugin.

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