Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
| <?php | |
| /* | |
| * Causes WooCommerce Ticket product pages to stop redirecting to their event page | |
| * See https://theeventscalendar.com/knowledgebase/selling-tickets-from-the-woocommerce-products-page/ | |
| */ | |
| function tribe_wootix_no_hijack() { | |
| if ( ! class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) return; | |
| $woo_tickets = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); | |
| remove_filter( 'post_type_link', array( $woo_tickets, 'hijack_ticket_link' ), 10, 4 ); |
| <?php | |
| /* | |
| * Event Tickets Plus v4.6+ - WooCommerce Tickets: Keep all but the lowest-priced | |
| * WooTicket for each event as Hidden visibility. Change the least-expensive to | |
| * Visible (Shop and search results). | |
| * | |
| * This snippet only works with WooCommerce 3.0.0+. | |
| * We could do the same logic on a different action, like when a ticket is | |
| * deleted or an attendee is created / ticket is sold, but this probably isn't |
| <?php | |
| /* | |
| * Event Tickets Plus v4.6+: Assign all WooCommerce Tickets to a specific | |
| * Product Category upon saving (create or update, won't affect old tickets). | |
| * | |
| * !!! YOU NEED TO CHANGE THE CODE TO BE THE PRODUCT CATEGORY ID(S) YOU WANT !!! | |
| * | |
| * @link https://gist.github.com/cliffordp/5bffd372db4ebf14482574ce9bb2479c This snippet. | |
| * @link https://gist.github.com/cliffordp/63abddea69b60f616c1aec1c6bdfc299 Another snippet you might be interested in. |
| # BEGIN WordPress | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.php$ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule . /index.php [L] | |
| </IfModule> | |
| # END WordPress |
| #!/usr/bin/swift | |
| // DISCLAIMER | |
| // This script modifies an unencrypted file associated with the trial version of Final Cut Pro. | |
| // Under the DMCA (17 U.S.C. § 1201), this modification does not qualify as circumvention of a technological | |
| // protection measure (TPM), as it does not involve bypassing encryption, authentication, or similar protections. | |
| // Distributing this code is therefore legal under the DMCA. | |
| // This script is intended for educational and research purposes, such as exploring trial-related file structures, |
| <?php | |
| require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | |
| $plugins = array( | |
| 'wordpress-seo/wp-seo.php', | |
| 'broken-link-checker/broken-link-checker.php' | |
| ); | |
| if ( strpos(get_site_url(), 'devserver.com') !== false ) { | |
| deactivate_plugins( $plugins ); | |
| } | |
| else { |
| <?php | |
| /* | |
| Plugin Name: Conditionally send WooCommerce emails | |
| Plugin URI: https://www.damiencarbery.com/2018/12/conditionally-disable-woocommerce-emails/ | |
| Description: Dynamically determine whether to send a WooCommerce email. | |
| Author: Damien Carbery | |
| Version: 0.2 | |
| */ | |
| // The filter name is 'woocommerce_email_enabled_'.WC_Email::id e.g. 'new_order', 'cancelled_order' etc |
| // Source for Jake Archibald's idb https://github.com/jakearchibald/idb/blob/v3.0.2/build/idb.js | |
| (function (global, factory) { | |
| typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | |
| typeof define === 'function' && define.amd ? define(['exports'], factory) : | |
| (global = global || self, factory(global.idb = {})); | |
| }(this, function (exports) { 'use strict'; | |
| function toArray(arr) { | |
| return Array.prototype.slice.call(arr); | |
| } |
| <?php // do not copy this line | |
| /** | |
| * Adds the product link to low and out of stock emails in WooCommerce | |
| * @param string $message Message stating low/out of stock. | |
| * @param object $product The product's object the email is for. | |
| * @return string The modified email with the link to edit the product. | |
| * | |
| * @link https://wordpress.org/support/topic/admin-stock-notification-emails/ | |
| * @link https://gist.github.com/jessepearson/701386d8ca5e4c84fc7cdf3d5d5391a3 |
Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐