Skip to content

Commit

Permalink
txt
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseHCalderon authored Sep 5, 2023
1 parent 68fc193 commit a8dba7d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@ public function __construct() {
$this->multipayment = $this->get_option( 'multipayment', 'no' );
$this->multi_duration = $this->get_option( 'multi_duration', 24 );
$this->multi_status = $this->get_option( 'multi_status', 'wc-pending' );
$allowed_html = array(
'strong' => array(),
);

$this->description = wp_kses(__('Acepta pagos con tarjetas de <strong>débito y crédito; Yape, Cuotéalo BCP y PagoEfectivo</strong> (billeteras móviles, agentes y bodegas).', 'fullculqi'), $allowed_html);
$this->instructions = $this->get_option( 'instructions', $this->description );
$this->description = $this->get_description();
$this->instructions = $this->get_option( 'instructions', $this->get_description() );
$this->msg_fail = $this->get_option( 'msg_fail' );
$this->time_modal = $this->get_option( 'time_modal', 0 );

Expand Down Expand Up @@ -557,6 +554,43 @@ public function get_title() {
}
}

public function get_description() {
$settings = fullculqi_get_settings();
$tarjeta = (isset($settings['methods']['tarjeta']) and $settings['methods']['tarjeta']!='0');
$yape = (isset($settings['methods']['yape']) and $settings['methods']['yape']!='0');
$billetera = (isset($settings['methods']['billetera']) and $settings['methods']['billetera']!='0');
$bancaMovil = (isset($settings['methods']['bancaMovil']) and $settings['methods']['bancaMovil']!='0');
$agente = (isset($settings['methods']['agente']) and $settings['methods']['agente']!='0');
$cuotealo = (isset($settings['methods']['cuetealo']) and $settings['methods']['cuetealo']!='0');
$txt_general = 'Acepta pagos con ';
$txt = '';
$txtPE = '';
if($tarjeta) {
$txt .= 'tarjetas de débito y crédito';
}
if($yape) {
if($tarjeta) {
$txt .= ', ';
}
$txt .= 'Yape';
}
if($billetera || $bancaMovil || $agente || $cuotealo) {
if($tarjeta || $yape) {
$txt .= ', ';
}
$txt .= 'Cuotéalo BCP y PagoEfectivo';
$txtPE = ' (billeteras móviles, agentes y bodegas)';
}
$txt = '<strong>'.$txt.'</strong>';
$txt = $txt_general. $txt. $txtPE;
$txt .= '.';
$allowed_html = array(
'strong' => array(),
);

return wp_kses(__($txt, 'fullculqi'), $allowed_html);
}

public function get_icon() {
// Return the icon image
$settings = fullculqi_get_settings();
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
Plugin Name: Culqi
Plugin URI:https://wordpress.org/plugins/culqi-checkout
Description: Culqi acepta pago con tarjetas, pagoefectivo, billeteras móviles y cuotéalo desde tu tienda virtual.
Description: Culqi acepta pagos con tarjetas de débito y crédito, Yape, Cuotéalo BCP y PagoEfectivo (billeteras móviles, agentes y bodegas).
Version: 3.0.7
Author: Culqi
Author URI: https://culqi.com/
Expand Down

0 comments on commit a8dba7d

Please sign in to comment.