Skip to content

Instantly share code, notes, and snippets.

Product,Description,Price
Croissants,A flaky and buttery French pastry that is perfect for breakfast or as a snack.,$2.50
Bagels,A dense and chewy bread with a hole in the center. Bagels are perfect for breakfast or as a sandwich bread.,$1.50
Scones,A sweet or savory pastry that is perfect for breakfast or as a snack. Scones are often flavored with fruits, nuts, or cheese.,$2.50
Muffins,A sweet breakfast pastry that is often flavored with fruits or nuts. Muffins can also be savory and are perfect for a quick snack or breakfast on the go.,$2.50
Cinnamon rolls,A sweet pastry made with a cinnamon sugar filling and topped with icing. Cinnamon rolls are perfect for breakfast or as a dessert.,$3.50
Danish pastries,A flaky and buttery pastry that is often filled with fruit or cheese. Danish pastries are perfect for breakfast or as a snack.,$2.50
Cookies,A sweet baked treat that is perfect for a snack or dessert. Cookies can be made with a variety of ingredients, such as chocolate chips, nuts, or dried fruits.,$1.50
javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f%3De.jQuery)%7C%7Cg>f.fn.jquery%7C%7Ch(f))%7Bc%3Da.createElement("script")%3Bc.type%3D"text/javascript"%3Bc.src%3D"http://ajax.googleapis.com/ajax/libs/jquery/"%2Bg%2B"/jquery.min.js"%3Bc.onload%3Dc.onreadystatechange%3Dfunction()%7Bif(!b%26%26(!(d%3Dthis.readyState)%7C%7Cd%3D%3D"loaded"%7C%7Cd%3D%3D"complete"))%7Bh((f%3De.jQuery).noConflict(1),b%3D1)%3Bf(c).remove()%7D%7D%3Ba.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,"1.3.2",function(%24,L)%7B%24(".ticket_properties .custom_field_22871957 textarea").select()%3B%7B document.execCommand(%27copy%27)%3B%7D%7D)%3B
@anant1811
anant1811 / optimize_woo.txt
Created October 8, 2018 17:15
Optimize WooCommerce
/**
* 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' ) );
@anant1811
anant1811 / remove_woo_sessions.txt
Created October 8, 2018 17:12
Remove WooCommerce Sessions
DELETE FROM wp_options
WHERE option_name LIKE '_wc_session_%' OR option_name LIKE '_wc_session_expires_%'
<div class="wpps-fullwidth">
<div>
[YOUR CONTENT HERE....]
</div>
</div>
@anant1811
anant1811 / woo-custom-redirect
Last active September 28, 2016 07:11
Woocommerce - custom redirection on checkout
//*Add custom redirection
add_action( 'template_redirect', 'wc_custom_redirect_after_purchase' );
function wc_custom_redirect_after_purchase() {
global $wp;
if ( is_checkout() && ! empty( $wp->query_vars['order-received'] ) ) {
wp_redirect( 'http://mysite.com/thank-you-for-your-order/' );
exit;
}
}
@anant1811
anant1811 / genesis-conditional-example.php
Created August 1, 2016 14:39
Genesis hook with conditional for front page
<?php
if ( ( is_front_page() ) )
{ ?>
<h2 class="seo-description">Hi there! I'm Ashish Anant - a WordPress and Genesis developer, web designer and consultant from India. Know <a href="/about/">more about me</a>, see <a href="/work">my work</a> and <a href="/project-planner/">contact me here</a>.</h2>
<?php }
?>
@anant1811
anant1811 / genesis-hooks-html
Last active August 1, 2016 14:11
Genesis Hooks - HTML Code
<div class="my-genesis-html"><p>Hello there!</p></div>
@anant1811
anant1811 / transfer.php
Created July 25, 2016 15:43
Transfer php script
<?php
set_time_limit(0); //Unlimited max execution time
$path = 'wp-content.zip';
$url = 'http://mysite.com/wp-content.zip';
$newfname = $path;
echo 'Starting Download!<br>';
$file = fopen ($url, "rb");
if($file) {
$newf = fopen ($newfname, "wb");