require_once ABSPATH . ‘vendor/autoload.php’; if (!function_exists(‘setup_google_client’)) { function setup_google_client() { $client = new \Google\Client(); $client->setApplicationName(‘Club Aguilas App’); $client->setScopes([\Google\Service\Sheets::SPREADSHEETS]); $client->setAuthConfig(ABSPATH . ‘clubaguilas-google.json’); return new \Google\Service\Sheets($client); } } function get_curp_data_from_sheet($curp) { try { $service = setup_google_client(); $spreadsheetId = ‘1Lp70q9RoN1Uk7nyKfu5i2Sht2LmfPOm0bXjLLmuzKvk’; $range = ‘EQUIPADO!A2:AD’;…Continue reading
require_once ABSPATH . ‘vendor/autoload.php’; if (!function_exists(‘setup_google_client’)) { function setup_google_client() { $client = new \Google\Client(); $client->setApplicationName(‘Club Aguilas App’); $client->setScopes([\Google\Service\Sheets::SPREADSHEETS]); $client->setAuthConfig(ABSPATH . ‘clubaguilas-google.json’); return new \Google\Service\Sheets($client); } } function get_curp_data_from_flag($curp) { try { $service = setup_google_client(); $spreadsheetId = ‘1Lp70q9RoN1Uk7nyKfu5i2Sht2LmfPOm0bXjLLmuzKvk’; $range = ‘FLAG!A2:AD’;…Continue reading
add_shortcode(‘mostrar_datos_nido’, ‘buscar_datos_jugadores_nido’); function setup_nido_google_client() { try { $client = new Google_Client(); $client->setApplicationName(‘Club Aguilas – Nido’); $client->setScopes(Google_Service_Sheets::SPREADSHEETS_READONLY); $client->setAuthConfig(ABSPATH . ‘clubaguilas-google.json’); // Archivo de credenciales específico para “nido” $service = new Google_Service_Sheets($client); echo ‘ Configuración de cliente completada. ‘; // Mensaje de…Continue reading
add_shortcode(‘mostrar_pagos_jugador’, ‘mostrar_pagos_jugador_func’); function mostrar_pagos_jugador_func() { if (!is_user_logged_in()) { return ‘Debes estar conectado para ver esta información.’; } if (!isset($_GET[‘curp’])) { return ‘No se ha especificado el ID del jugador.’; } $curp = strtoupper($_GET[‘curp’]); $spreadsheetId = ‘1psOjRaKwbyLEIF6o1H7zLbPBURtDzVFyIB5e_hYkVns’; $service = setup_google_client(); try…Continue reading
/** * Hiding Zero Quantity Items in Email Notifications for Payment Fields * * @link https://wpforms.com/developers/how-to-hide-zero-quantity-items-in-dropdown-payment-field-notifications */ add_filter(‘wpforms_entry_email_data’, function ($fields, $entry, $form_data) { foreach ($fields as $field_id => $field) { // Adjust to handle ‘payment-single’, ‘payment-select’, or any other types…Continue reading
add_filter( ‘woocommerce_coupon_message’, ‘modify_woocommerce_coupon_message’, 10, 3 ); function modify_woocommerce_coupon_message( $msg, $msg_code, $coupon ) { if( $msg === __( ‘Coupon code applied successfully.’, ‘woocommerce’ ) ) { $msg = sprintf( __( “You are getting $%s discounts.”, “woocommerce” ), ‘‘ . $coupon->get_amount() .…Continue reading
HT7QEURQBGMT8HF2N Home v4Continue reading
// Updated 2024-07-29 if ( ! function_exists(‘mx_custom_glance_items’)) { function mx_custom_glance_items() { // Return a list of all saved post_type entries in the database global $wpdb; $post_types_result = $wpdb->get_results(” SELECT DISTINCT(post_type), COUNT(*) as count FROM {$wpdb->posts} GROUP BY post_type ORDER BY…Continue reading