This file contains hidden or 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 | |
/** | |
* Plugin Name: Jigoshop PagSeguro Fix Produdt Add-ons | |
* Plugin URI: http://www.claudiosmweb.com/ | |
* Description: Adds Products Add-ons like new products in the cart Jigoshop PagSeguro. | |
* Author: claudiosanches | |
* Author URI: http://www.claudiosmweb.com/ | |
* Version: 1.1 | |
* License: GPLv2 or later | |
*/ |
This file contains hidden or 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
/** | |
* Print table view. | |
*/ | |
function cs_show_table_in_description() { | |
global $wcCreditCardInterestTable; | |
echo $wcCreditCardInterestTable->print_view(); | |
} | |
add_action( 'woocommerce_single_product_summary', 'cs_show_table_in_description', 15 ); |
This file contains hidden or 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 | |
/* | |
* Template Name: Boleto | |
*/ | |
// Validação exemplo: | |
if ( isset( $_GET['id'] ) $_GET['id'] && != '' ) { | |
wp_die( 'Explicação do erro' ); | |
} |
This file contains hidden or 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
/** | |
* Alter add to cart text. | |
* | |
* @return string New text. | |
*/ | |
function alter_add_to_cart_text() { | |
return __( 'Orça' ); | |
} | |
add_filter( 'single_add_to_cart_text', 'alter_add_to_cart_text' ); |
This file contains hidden or 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 | |
/** | |
* Custom Mail from name | |
* | |
* @param string $name Old from name. | |
* | |
* @return string New from name. | |
*/ | |
function cs_custom_mail_from_name( $name ) { | |
return 'Nome do jovem ou do blog'; |
This file contains hidden or 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
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ',', '.') WHERE meta_key = '_price'; | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ',', '.') WHERE meta_key = '_regular_price'; | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ',', '.') WHERE meta_key = '_sale_price'; | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ',', '.') WHERE meta_key = '_min_variation_price'; | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ',', '.') WHERE meta_key = '_max_variation_price'; | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ',', '.') WHERE meta_key = '_min_variation_regular_price'; | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ',', '.') WHERE meta_key = '_max_variation_regular_price'; | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ',', '.') WHERE meta_key = '_min_variation_sale_price'; | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ',', '.') WHERE meta_key = '_max_variation_sale_price'; |
This file contains hidden or 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 comment_form( array( 'comment_notes_after' => '' ) ); ?> |
This file contains hidden or 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 | |
/** | |
* Custom simple product price format. | |
* | |
* Adds credit cart parcels in price html. | |
* | |
* @param string $price Old price format. | |
* | |
* @return string Price format with credit card parcels. | |
*/ |
This file contains hidden or 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 | |
// Esse é o arquivo com a base das funções. | |
// Tente não alterar ele. | |
/** | |
* Theme Options Functions | |
*/ | |
/** | |
* Load options scripts |
This file contains hidden or 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 cs_updated_client_points( $order_id ) { | |
global $woocommerce; | |
// Cria logs de para debugar o código. | |
// Os logs irão para wp-content/plugins/woocommerce/logs/testando.txt | |
// Você precisa dar permissão de escrita nesta pasta para funcionar! | |
$log = $woocommerce->logger(); | |
// Nome do custom field que iremos usar para salvar no perfil do usuário: |