This file contains 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 //only copy this line if needed | |
/** | |
* Function filters the threshold for the amount of variables to load in the front end. | |
* | |
* @see https://woocommerce.wordpress.com/2015/07/13/improving-the-variations-interface-in-2-4/ | |
* | |
* @return int 100 The new threshold. | |
*/ | |
add_filter( 'woocommerce_ajax_variation_threshold', function() { return 100; } ); |
This file contains 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 | |
/** | |
* Event Tickets Plus - Disable Taxes for Ticket Products | |
*/ | |
function tribe_disable_taxes_ticket_product( $post_id, $ticket ) { | |
update_post_meta( $ticket->ID, '_tax_status', 'none' ); | |
update_post_meta( $ticket->ID, '_tax_class', 'zero-rate' ); | |
} | |
add_action( 'event_tickets_after_save_ticket', 'tribe_disable_taxes_ticket_product', 10, 2 ); |
This file contains 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 tribe_custom_theme_text_with_context ( $translation, $text, $context, $domain ) { | |
// Put your custom text here in a key => value pair | |
// Example: 'Text you want to change' => 'This is what it will be changed to' | |
// The text you want to change is the key, and it is case-sensitive | |
// The text you want to change it to is the value | |
// You can freely add or remove key => values, but make sure to separate them with a comma | |
// This example changes the label "Venue" to "Location", and "Related Events" to "Similar Events" |
This file contains 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 | |
/* | |
* EXAMPLE OF CHANGING ANY TEXT (STRING) IN THE EVENTS CALENDAR | |
* See the codex to learn more about WP text domains: | |
* http://codex.wordpress.org/Translating_WordPress#Localization_Technology | |
* Example Tribe domains: 'tribe-events-calendar', 'tribe-events-calendar-pro'... | |
*/ | |
function tribe_custom_theme_text ( $translation, $text, $domain ) { | |
This file contains 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_action( 'gform_user_registered','we_autologin_gfregistration', 10, 4 ); | |
/** | |
* Auto login to site after GF User Registration Form Submittal | |
* | |
*/ | |
function we_autologin_gfregistration( $user_id, $config, $entry, $password ) { | |
wp_set_auth_cookie( $user_id, false, '' ); | |
} |
This file contains 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 | |
/** | |
* Autocomplete orders with virtual products (WC 2.2+) | |
* | |
* @see https://metorik.com/blog/autocomplete-all-the-orders-in-woocommerce | |
*/ | |
function bryce_autocomplete_virtual_orders( $order_status, $order_id ) { | |
$order = wc_get_order( $order_id ); |
This file contains 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
/** | |
* Snippet to set default weight and Dimension if it's not set for any product. | |
* Created at : 14 May 2018 | |
* Updated at : 16 May 2018 | |
* Xadapter Plugins : https://www.xadapter.com/shop/ | |
* Gist Link : https://gist.github.com/xadapter/4fb8dbfc6c025630558e43488775eb7d | |
*/ | |
// To set Default Length | |
add_filter( 'woocommerce_product_get_length', 'xa_product_default_length' ); |
This file contains 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 | |
// Add to functions.php of your theme or child theme. Don't include the php tag above this line! | |
/** | |
* This code will add subtotal to the edit order admin in WooCommerce. | |
* | |
* @author Sprucely Designed <support@sprucely.net> | |
* @see https://github.com/woocommerce/woocommerce/issues/17172 | |
* @param int $order_id Order ID retreived from db for order being displayed. | |
*/ |
This file contains 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
<table style="width: 600px; margin: 0 auto; padding: 0; border-spacing: 0; border-collapse: collapse;"><tbody><tr><td style="background: #040404; margin-top: 0; padding: 0;"><img style="display: block; border: 0; line-height: 1;" src="https://typewheel.xyz/share/typewheel-email-banner.png" alt="Typewheel" width="600" /></td></tr><tr><td style="padding: 2em; background-image: linear-gradient( to bottom, #D7D7D7, #E7D3BA);"><p style="margin: 0 2em 2em;">Hello [client.contact.nickname]! Here's an overview of the things I am doing to keep your site updated, optimized, and secure.</p><p style="text-align: center; margin: 0 0 1.5em;"><img style="display: block; margin: 0 auto .5em;" src="[client.logo.url]" alt="[client.name] Logo" height="100" /><span style="text-align: center; font-size: 28px;"><strong>[report.daterange]</strong></span><br /><span style="text-align: center; font-size: 28px;"><strong><a style="color: #040404; text-decoration: none;" href="[client.site.url]">[client.site.domain]</a></strong></span>< |
This file contains 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
{% assign current_variant = product.selected_or_first_available_variant %} | |
<div id="richsnippet"> | |
<div itemscope itemtype="http://schema.org/Product"> | |
<meta itemprop="url" content="{{ shop.url }}{{ product.url }}"> | |
<meta itemprop="image" content="{{ product.featured_image.src | img_url: 'grande' }}"> | |
<meta itemprop="name" content="{{ product.title | escape }}"> | |
<meta itemprop="description" content="{{ product.description | strip_html }}"> | |
{% if product.vendor %}<meta itemprop="brand" content="{{ product.vendor }}">{% endif %} |
NewerOlder