We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69feaf4 commit 640b5b9Copy full SHA for 640b5b9
1 file changed
inc/models/class-product.php
@@ -1361,10 +1361,14 @@ public function get_demo_behavior(): string {
1361
*
1362
* @since 2.5.0
1363
1364
- * @param string $behavior Either 'delete_after_time' or 'keep_until_live'.
+ * @param string|null $behavior Either 'delete_after_time' or 'keep_until_live'. Null is ignored (default applied at read time).
1365
* @return void
1366
*/
1367
- public function set_demo_behavior(string $behavior): void {
+ public function set_demo_behavior($behavior) {
1368
+
1369
+ if (null === $behavior) {
1370
+ return;
1371
+ }
1372
1373
$this->meta[ self::META_DEMO_BEHAVIOR ] = $behavior;
1374
0 commit comments