: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
namespace WPForms\Admin\Payments\Views\Overview;
* Payments Overview Mode Toggle class.
* Determine if the toggle should be displayed and render it.
public function display() {
// Bail early if no payments are found in test mode.
if ( ! $this->should_display() ) {
* Look for at least one payment in test mode.
private function should_display() {
return wpforms()->get( 'payment' )->get_payments(
* Display the toggle button.
private function render() {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'admin/payments/mode-toggle',
'mode' => Page::get_mode(),