Skip to content

Commit 680797c

Browse files
committed
Disable parent property temporarily due to potential error
1 parent 28f1213 commit 680797c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/PostTypes/Post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public function withModifiedDate()
134134

135135
public function withParent()
136136
{
137-
$this->parent = new self($this->WP_Post->post_parent);
137+
// $this->parent = new self($this->WP_Post->post_parent ?: 0);
138138

139139
return $this;
140140
}

src/Terms/Term.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace OOPWP\Terms;
44

5+
use WP_Term;
6+
57
class Term
68
{
79
public int $id;
@@ -66,7 +68,7 @@ public function withUrl()
6668

6769
public function withParent()
6870
{
69-
$this->parent = new self($this->WP_Term->parent, $this->taxonomy);
71+
// $this->parent = new Term($this->WP_Term->parent, $this->taxonomy);
7072

7173
return $this;
7274
}

0 commit comments

Comments
 (0)