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
probando nuevo en gisto |
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
probando nuevo desde github | |
va |
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
add_action('template_redirect','pmpro_woocommerce_redirect_checkout'); | |
function pmpro_woocommerce_redirect_checkout(){ | |
$id = get_option('pmpro_checkout_page_id'); | |
global $post; | |
if($post->ID == $id && !empty($_REQUEST['level'])){ | |
global $wpdb; | |
$product_id = $wpdb->get_var($wpdb->prepare("SELECT pm.post_id FROM {$wpdb->postmeta} as pm LEFT JOIN {$wpdb->posts} as p ON p.ID=pm.post_id WHERE pm.meta_key = %s AND pm.meta_value = %d AND p.post_status='publish'",'_membership_product_level',$_REQUEST['level'])); | |
if(!empty($product_id)){ | |
$checkout_url = WC()->cart->get_checkout_url(); | |
if ( sizeof( WC()->cart->get_cart() ) > 0 ) { |
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
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
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 | |
//* Incluir en el functions.php y personalizar | |
/** | |
* Manage WooCommerce styles and scripts. | |
*/ | |
function grd_woocommerce_script_cleaner() { | |
// Remove the generator tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
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
https://codex.wordpress.org/Converting_Database_Character_Sets |
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
#Para iniciar servicio de apache si esta caido, desde el cron por ejemplo | |
*/5 * * * * /etc/init.d/apache2 status | grep -q running || /etc/init.d/apache2 start | |
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
https://wordpress.stackexchange.com/questions/8736/add-custom-field-to-category | |
https://en.bainternet.info/wordpress-taxonomies-extra-fields-the-easy-way/ | |
https://wpcrumbs.com/how-to-add-custom-fields-to-categories/ |
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
add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2); | |
function change_existing_currency_symbol( $currency_symbol, $currency ) { | |
switch( $currency ) { | |
case 'AUD': $currency_symbol = 'AUD$'; break; | |
} | |
return $currency_symbol; | |
} |
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
git checkout master | |
git pull origin master | |
git merge test | |
git push origin master |