Last active
May 10, 2020 12:02
-
-
Save Oscar-Abad-Folgueira/c5044321682f11b016903b35fc89fb26 to your computer and use it in GitHub Desktop.
WooCommerce: Añadir contenido a "Mi cuenta"
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 | |
/** | |
* @hook woocommerce_account_content | |
* @author Oscar Abad Folgueira | |
* @author_url https://www.oscarabadfolgueira.com | |
* @snippet_url https://www.oscarabadfolgueira.com/hooks/woocommerce_account_content/ | |
* @description Añadir contenido a "Mi cuenta" en WooCommerce. | |
*/ | |
// Definir la función que realizará las acciones que queramos que se lleven a cabo | |
function oaf_anadir_woocommerce_account_content() { | |
echo "<strong>Texto de ejemplo para ver dónde se muestra dentro de 'Mi cuenta'</strong>"; | |
// incluir más código.... | |
} | |
// añadir la acción con la función definida anteriormente | |
add_action( 'woocommerce_account_content', 'oaf_anadir_woocommerce_account_content', 10, 0 ); | |
// Quitar el contenido añadido anteriormente | |
remove_action( 'woocommerce_account_content', 'oaf_anadir_woocommerce_account_content', 10, 0 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment