Example #1
0
<?php

global $opCliente;
global $clubCanasta;
global $procesoRegistro;
add_action('get_header', function () {
    global $current_user;
    if (isset($_POST['action']) and $_POST['action'] == 'suspender-canasta') {
        suspenderCanastaTemporal($_POST, $current_user->ID);
    }
    if (isset($_POST['action']) and $_POST['action'] == 'reanudar-canasta') {
        reanudarCanasta($current_user->ID);
    }
    if (isset($_POST['action']) and $_POST['action'] == 'delete-aditional') {
        deleteIngredienteAdicional($_POST);
    }
    if (isset($_POST['action']) and $_POST['action'] == 'save-additional-ingredient') {
        setIngredienteAdicional($_POST);
    }
    if (is_page('mi-cuenta') and isset($_POST['club'])) {
        saveClubCliente($_POST['club']);
    }
    if (is_page('mi-cuenta')) {
        checkStatusCliente();
    }
    if (is_page('mi-cuenta')) {
        getClubAndCanasta();
    }
});
if (isset($_POST['action']) and $_POST['action'] == 'create-client') {
    setNuevoCliente($_POST);
Example #2
0
 /**
  * ACTUALIZAR SALDO Y SUSPENDER CANASTAS
  * @return [type] [description]
  */
 public function updateCliente()
 {
     if (isset($this->dataPost['saldo']) and function_exists('updateSaldoCliente')) {
         updateSaldoCliente($this->clienteId, $this->dataPost['saldo']);
     }
     if (isset($this->dataPost['suspension']) and function_exists('suspenderCanastaTemporal')) {
         suspenderCanastaTemporal($this->dataPost, $this->clienteId);
     }
     $urlRedirect = admin_url() . 'admin.php?page=cliente&id_cliente=' . $this->clienteId;
     wp_redirect($urlRedirect);
 }