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
# GET number of orders | |
select count(*)from wp_posts where post_type = 'shop_order'; | |
# DELETE ORDER DATA FROM POSTMETA TABLE | |
delete from wp_postmeta where post_id in (select ID from wp_posts where post_type = 'shop_order'); | |
# DELETE ORDER DATA FROM POSTS TABLE | |
delete from wp_posts where post_type = 'shop_order'; |
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
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
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
object(WP_Roles)[1286] | |
public 'roles' => | |
array (size=9) | |
'administrator' => | |
array (size=2) | |
'name' => string 'Administrator' (length=13) | |
'capabilities' => | |
array (size=139) | |
'switch_themes' => boolean true | |
'edit_themes' => boolean true |
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
SELECT subscription_line_items.subscription_id, | |
subscriptions.post_status, | |
product.id AS product_id, | |
product.post_title AS product_name, | |
product.post_status, | |
mo.product_type, | |
subscription_line_items.qty, | |
subscription_line_items.product_total, | |
subscription_meta.currency, | |
subscription_meta.billing_period, |
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
/* Woocommerce Styles */ | |
/* | |
A couple things to note... | |
1. This code was written very specifically for my base child theme so it might not work out of the box with every theme. | |
I have it here mostly to share with anyone who might be looking to do the same thing I was. | |
2. I generally add my WooCommerce CSS overrides to a custom-woo.css file then use wp_enqueue_style() to call it | |
so that it enqueues after the default WooCommerce Stylesheets |
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
add_filter( 'wp_footer' , 'woo_add_checkout_field_date_range_limit' ); | |
/** | |
* woo_add_checkout_field_date_range_limit | |
* | |
* @access public | |
* @since 1.0 | |
* @return void | |
*/ | |
function woo_add_checkout_field_date_range_limit() { |
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: Easy GitHub Gist Shortcodes | |
Plugin URI: http://www.remicorson.com/easy-github-gist-shortcodes | |
Description: Insert easily GitHub Gist within shortcodes this way [gist id="xxxxxx"] | |
Version: 1.0 | |
Author: Remi Corson | |
Author URI: http://www.remicorson.com/ | |
*/ |
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: Easy Default Parameters | |
Plugin URI: http://remicorson.com | |
Description: Set your own default parameters on a fresh WordPress install | |
Version: 0.1 | |
Author: Rémi Corson | |
Author URI: http://remicorson.com | |
Contributors: Rémi Corson, corsonr | |
*/ |