Skip to content

Muti-DB woocommemrce multi-site conflicts #5

@mrbm

Description

@mrbm

Seeing more issues with multi-db and woocommerce...have no idea why.

in the file: includes/class-wc-order-factory.php the function:

public function get_order( $the_order = false )

is failing because the multi-db plugin is not select the correct database when attempting to use:

get_post( $the_order ):

My solution was to modify the get_order function by manually selecting the right databas associated with the blog id and then manually performing the get_post functionality...pain in the butt, however it worked.

Now another more complicated problem has happened:

in the file: includes/abstracts/abstract-wc-order.php
public function set_total()

Is failing because the wrong database is being used when attempting to use the wordpress function:
update_post_meta( $this->id, $key, $amount );

Woocommerce is a very popular plugin, any thoughts you might have regarding why this is happening? Appreciate it, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions