Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../public_h.../clone/wp-conte.../plugins/wpforms-.../includes/admin/builder/panels
File: class-payments.php
<?php
[0] Fix | Delete
[1] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[2] Fix | Delete
exit;
[3] Fix | Delete
}
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Payments panel.
[7] Fix | Delete
*
[8] Fix | Delete
* @since 1.0.0
[9] Fix | Delete
*/
[10] Fix | Delete
class WPForms_Builder_Panel_Payments extends WPForms_Builder_Panel {
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* All systems go.
[14] Fix | Delete
*
[15] Fix | Delete
* @since 1.0.0
[16] Fix | Delete
*/
[17] Fix | Delete
public function init() {
[18] Fix | Delete
[19] Fix | Delete
// Define panel information.
[20] Fix | Delete
$this->name = esc_html__( 'Payments', 'wpforms-lite' );
[21] Fix | Delete
$this->slug = 'payments';
[22] Fix | Delete
$this->icon = 'fa-usd';
[23] Fix | Delete
$this->order = 10;
[24] Fix | Delete
$this->sidebar = true;
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* Output the Payments panel sidebar.
[29] Fix | Delete
*
[30] Fix | Delete
* @since 1.0.0
[31] Fix | Delete
*/
[32] Fix | Delete
public function panel_sidebar() {
[33] Fix | Delete
[34] Fix | Delete
// Sidebar contents are not valid unless we have a form.
[35] Fix | Delete
if ( ! $this->form ) {
[36] Fix | Delete
return;
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
$this->panel_sidebar_section( esc_html__( 'Default', 'wpforms-lite' ), 'default' );
[40] Fix | Delete
[41] Fix | Delete
do_action( 'wpforms_payments_panel_sidebar', $this->form );
[42] Fix | Delete
}
[43] Fix | Delete
[44] Fix | Delete
/**
[45] Fix | Delete
* Output the Payments panel primary content.
[46] Fix | Delete
*
[47] Fix | Delete
* @since 1.0.0
[48] Fix | Delete
*/
[49] Fix | Delete
public function panel_content() {
[50] Fix | Delete
[51] Fix | Delete
// An array of all the active provider addons.
[52] Fix | Delete
$payments_active = apply_filters( 'wpforms_payments_available', [] );
[53] Fix | Delete
[54] Fix | Delete
if ( ! $this->form ) {
[55] Fix | Delete
[56] Fix | Delete
// Check if there is a form created. When no form has been created
[57] Fix | Delete
// yet let the user know we need a form to setup a payment.
[58] Fix | Delete
echo '<div class="wpforms-alert wpforms-alert-info">';
[59] Fix | Delete
echo wp_kses(
[60] Fix | Delete
__( 'You need to <a href="#" class="wpforms-panel-switch" data-panel="setup">setup your form</a> before you can manage these settings.', 'wpforms-lite' ),
[61] Fix | Delete
[
[62] Fix | Delete
'a' => [
[63] Fix | Delete
'href' => [],
[64] Fix | Delete
'class' => [],
[65] Fix | Delete
'data-panel' => [],
[66] Fix | Delete
],
[67] Fix | Delete
]
[68] Fix | Delete
);
[69] Fix | Delete
echo '</div>';
[70] Fix | Delete
[71] Fix | Delete
return;
[72] Fix | Delete
}
[73] Fix | Delete
[74] Fix | Delete
if ( empty( $payments_active ) ) {
[75] Fix | Delete
[76] Fix | Delete
// Check for active payment addons. When no payment addons are
[77] Fix | Delete
// activated let the user know they need to install/activate an
[78] Fix | Delete
// addon to setup a payment.
[79] Fix | Delete
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-default">
[80] Fix | Delete
<div class="illustration illustration-payments"></div>
[81] Fix | Delete
<h5>' . esc_html__( 'Install Your Payment Integration', 'wpforms-lite' ) . '</h5>
[82] Fix | Delete
<p>' . sprintf(
[83] Fix | Delete
wp_kses(
[84] Fix | Delete
/* translators: %s - addons page URL. */
[85] Fix | Delete
__( 'It seems you do not have any payment addons activated. You can head over to the <a href="%s">Addons page</a> to install and activate the addon for your payment service.', 'wpforms-lite' ),
[86] Fix | Delete
[
[87] Fix | Delete
'a' => [
[88] Fix | Delete
'href' => [],
[89] Fix | Delete
],
[90] Fix | Delete
]
[91] Fix | Delete
),
[92] Fix | Delete
esc_url( admin_url( 'admin.php?page=wpforms-addons' ) )
[93] Fix | Delete
) .
[94] Fix | Delete
'</p>
[95] Fix | Delete
</div>';
[96] Fix | Delete
[97] Fix | Delete
} else {
[98] Fix | Delete
[99] Fix | Delete
// Everything is good - display default instructions.
[100] Fix | Delete
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-default">
[101] Fix | Delete
<div class="illustration illustration-payments"></div>
[102] Fix | Delete
<h5>' . esc_html__( 'Install Your Payment Integration', 'wpforms-lite' ) . '</h5>
[103] Fix | Delete
<p>' . esc_html__( 'It seems you don\'t have any payment addons activated. Click one of the available addons and start accepting payments today!', 'wpforms-lite' ) . '</p>
[104] Fix | Delete
</div>';
[105] Fix | Delete
}
[106] Fix | Delete
[107] Fix | Delete
do_action( 'wpforms_payments_panel_content', $this->form );
[108] Fix | Delete
}
[109] Fix | Delete
}
[110] Fix | Delete
new WPForms_Builder_Panel_Payments();
[111] Fix | Delete
[112] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function