[sudo] apt-get install stunnelcd path/to/django/project| <?php | |
| // Test cards | |
| $cards = array( | |
| '378282246310005', // American Express | |
| '371449635398431', // American Express | |
| '5078601870000127985', // Aura | |
| '5078601800003247449', // Aura | |
| '30569309025904', // Diners Club | |
| '38520000023237', // Diners Club |
| <?php | |
| /** | |
| * Custom Loop Add to Cart. | |
| * | |
| * Template with quantity and ajax. | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. | |
| global $product; |
| <?php | |
| /** | |
| * Hide the "In stock" message on product page. | |
| * | |
| * @param string $html | |
| * @param string $text | |
| * @param WC_Product $product | |
| * @return string | |
| */ | |
| function my_wc_hide_in_stock_message( $html, $text, $product ) { |
| <?php | |
| class My_Custom_My_Account_Endpoint { | |
| /** | |
| * Custom endpoint name. | |
| * | |
| * @var string | |
| */ | |
| public static $endpoint = 'my-custom-endpoint'; |
| function custom_wc_ajax_variation_threshold( $qty, $product ) { | |
| return 10; | |
| } | |
| add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 ); |
| add_filter( 'woocommerce_price_trim_zeros', '__return_false' ); |
| <?php | |
| /** | |
| * Custom WooCommerce tag cloud shortcode. | |
| * | |
| * Use the follow shortcode in your pages: [my_wc_tag_cloud] | |
| */ | |
| function my_custom_wc_tag_cloud_shortcode() { | |
| return wp_tag_cloud( array( 'taxonomy' => 'product_tag', 'echo' => false ) ); | |
| } |
| <div class="form-group"> | |
| <label for="phone">Telefone <span class="required">*</span></label> | |
| <input type="text" class="form-control" id="phone" name="phone" placeholder="(99) 9999-9999" pattern="(\([0-9]{2}\))\s([9]{1})?([0-9]{4})-([0-9]{4})" title="Número de telefone precisa ser no formato (99) 9999-9999" required="required" /> | |
| </div> |