This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the following list of actions, there are paths from my Mac. You should replace the path with the one that corresponds to yours. | |
In principle, you should only change the username in the path to yours. | |
(Install Xcode > https://guide.macports.org/#installing.xcode) | |
xcode-select --install | |
sudo xcodebuild -license | |
Descargar PKG para OS https://www.macports.org/install.php | |
export PATH=/opt/local/bin:/opt/local/sbin:$PATH | |
sudo port -v selfupdate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function jconti_activar_gutenberg_en_productos( $can_edit, $post_type ){ | |
if ( $post_type === 'product' ){ | |
$can_edit = true; | |
} | |
return $can_edit; | |
} | |
add_filter( 'use_block_editor_for_post_type', 'jconti_activar_gutenberg_en_productos', 10, 2 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Filtro que solo funciona en el plugin premium WooCommerce Redsys Gateway https://woocommerce.com/products/redsys-gateway | |
add_filter( 'redsys_modify_data_to_send', 'datos_modificados_pasarela_pago_en_redsys' ); // Filtro para «Redsys redirección (por Jose Conti)» | |
function datos_modificados_pasarela_pago_en_redsys( $redsys_data_send ) { | |
$order_id = WCRed()->clean_order_number( $redsys_data_send['transaction_id2'] ); | |
$order = new WC_Order( $order_id ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'language_attributes', 'mi_lang_personalizado' ); | |
function mi_lang_personalizado( $output ) { | |
if ( is_page( 34 ) ) { | |
return 'lang="en_US"'; | |
} | |
return $output; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'redsys_mail_add_token', 'datos_modificados_redsys_mail_add_token' ); | |
function datos_modificados_redsys_mail_add_token( $data ) { | |
$name = $data['name']; | |
$last_name = $data['last_name']; | |
$site_title = $data['site_title']; | |
$subject = $data['subject']; | |
$body = $data['body']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* SOAP Test for Redsys. | |
* | |
* @package WooCommerce Redsys Gateway (https://woocommerce.com/es-es/products/redsys-gateway/) | |
* @copyright José Conti | |
*/ | |
if ( ! class_exists( 'SoapClient' ) ) { | |
echo 'ATENCIÓN, SOAP NO ACTIVO'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function anadir_metaboxes_the7_a_cpt( $post_type_array ) { | |
$post_type_array[] = 'nombre_custom_post_type'; | |
return $post_type_array; | |
} | |
add_filter( 'presscore_pages_with_basic_meta_boxes', 'anadir_metaboxes_the7_a_cpt' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Script para migrar los Token creado por el plugin Redsys PRO de modulosdepago.es a la forma correcta de guardarlos | |
* utilizando la API para Tokens de WooCommerce, y de esta forma poder utilizar el plugin oficial de WooCommerce.com para Redsys | |
* sin problemas y guardar los datos tal y como se debe hacer en WooCommerce. | |
* Solo necesitas tener activado WooCommerce, no hace falta que esté activo ningún otro plugin ya que este script solo utiliza | |
* la API de WordPress y de WooCommerce. | |
* Plugin oficial de WooCommerce.com para Redsys: https://woo.com/products/redsys-gateway/ | |
*/ | |
/* |
NewerOlder