• Resolved btribouillet

    (@btribouillet)


    woo-price-per-unit.php (line 401), maybe some other lines but this is the one throwing the warning.

    $prod_id=$product->id;

    It should be instead:

    $prod_id=$product->get_id();

    Since product properties are protected ;).

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter btribouillet

    (@btribouillet)

    And here as well

    public function get_single_id(){
    global $product;
    $this->single_pr_id=$product->id;
    }

    should be :

    public function get_single_id(){
    global $product;
    $this->single_pr_id=$product->get_id();
    }

    Plugin Author Martin Mechura

    (@mechuram)

    Thanks for the insight. I’ve found this long ago, but forgot to fix it in free version. Will fix it here also soon.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Warning: ID can’t be accessed directly’ is closed to new replies.