Skip to content

Commit

Permalink
Fixes PHP Warning "Missing Argument 2" in some WooCommerce themes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick Wong committed Mar 5, 2014
1 parent a2c8d4f commit ff383ab
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions MPM/mpm_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,25 +282,29 @@ public function return_page_hide($pages)
}

/**
* Alters the return page title
* Alters the return page title.
*
* @param string $title
* @param int $id
* @param int $id (Optional) Default NULL.
* @return string
*/
public function return_page_title($title, $id)
public function return_page_title ($title, $id = NULL)
{
if (!$this->is_return_page($id))
{
return $title;
}

if (!$order = $this->order_get($_GET['order'], $_GET['key']))
{
return $this->return_page_titles['invalid'];
}

if (!in_array($order->status, array_keys($this->return_page_titles)))
{
return $this->return_page_titles['invalid'];
}

return $this->return_page_titles[$order->status];
}

Expand Down

0 comments on commit ff383ab

Please sign in to comment.