Skip to content

Instantly share code, notes, and snippets.

View seb86's full-sized avatar
🚀

Sébastien Dumont seb86

🚀
View GitHub Profile
@seb86
seb86 / gist:5728571
Last active December 18, 2015 04:49
writepanel-product_data.php - Added download type select option.
// Download Type
woocommerce_wp_select( array( 'id' => '_download_type', 'label' => __( 'Download Type', 'woocommerce' ), 'options' => array(
'application' => __( 'Application/Software', 'woocommerce' ),
'music' => __( 'Music', 'woocommerce' ),
) ) );
@seb86
seb86 / gist:5728582
Last active December 18, 2015 04:49
woocommerce-hooks.php - Added action for the product schema before the single products.
add_action( 'woocommerce_before_single_product', 'woocommerce_product_schema', 10 );
@seb86
seb86 / gist:5728772
Last active December 18, 2015 04:58
content-single-product.php - Line 24 is removed and replaced with a comment.
<?php /* The beginning of the product container is added by the hook - woocommerce_product_schema */ ?>
@seb86
seb86 / gist:5730061
Last active December 18, 2015 05:08
writepanel-product_data.php - Saves the new field for the download type. After line 1015
if ( isset( $_POST['_download_type'] ) )
update_post_meta( $post_id, '_download_type', esc_attr( $_POST['_download_type'] ) );
@seb86
seb86 / gist:5730383
Created June 7, 2013 16:05
New template file for single-product in WooCommerce. schema.php
<?php
/**
* Identifies the product type and outputs the
* correct Schema for the beginning of the
* product container.
*
* @author: Seb's Studio
* @package WooCommerce/Templates
* @version 2.1
*/
@seb86
seb86 / gist:5730401
Created June 7, 2013 16:07
woocommerce\woocommerce-template.php - Between Line 466 Line 467
if ( ! function_exists( 'woocommerce_product_schema' ) ) {
/**
* Outputs the correct Schema for the beginning of the product container.
*
* @access public
* @subpackage Product
* @return void
*/
<?php
/**
* Plugin Name: WooCommerce Email Customer Address
* Plugin URI: https://gist.github.com/BFTrick/7891074
* Description: Email the site admin when a customer changes their address
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 1.0
*
* This program is free software: you can redistribute it and/or modify
<?php
/**
* Plugin Name: WooCommerce Remove Billing Fields for Free Virtual Products
* Plugin URI: https://gist.github.com/BFTrick/7873168
* Description: Remove the billing address fields for free virtual orders
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 1.0
*
* This program is free software: you can redistribute it and/or modify
<?php
/**
* Plugin Name: WooCommerce Check Terms & Conditions
* Plugin URI: https://gist.github.com/BFTrick/7789974
* Description: Make the Terms & Conditions checkbox checked by default
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 1.0
*
* This program is free software: you can redistribute it and/or modify
<?php
/*
Plugin Name: WooCommerce <enter name> Gateway
Plugin URI: http://woothemes.com/woocommerce
Description: Extends WooCommerce with an <enter name> gateway.
Version: 1.0
Author: WooThemes
Author URI: http://woothemes.com/
Copyright: © 2009-2011 WooThemes.