Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
<!-- wp:group {"className":"hero-scroll-container glow glow-light","layout":{"type":"constrained"}} --> | |
<div class="wp-block-group hero-scroll-container glow glow-light"><!-- wp:group {"align":"full","className":"hero-scroll","style":{"spacing":{"blockGap":"var:preset|spacing|small"}},"layout":{"type":"flex","flexWrap":"nowrap","verticalAlignment":"top"},"blockVisibility":{"controlSets":[{"id":1,"enable":true,"controls":{"screenSize":{"hideOnScreenSize":{"small":true,"medium":true}}}}]}} --> | |
<div class="wp-block-group alignfull hero-scroll"><!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|small"}},"layout":{"type":"flex","orientation":"vertical"}} --> | |
<div class="wp-block-group"><!-- wp:image {"id":57349,"sizeSlug":"full","linkDestination":"none"} --> | |
<figure class="wp-block-image size-full"><img src="https://olliewp.com/wp-content/uploads/2024/05/Frame-1597881480-jpg.webp" alt="Frame 1597881480" class="wp-image-57349"/></figure> | |
<!-- /wp:image --> | |
<!-- wp:image {"id":57350,"sizeSlug":"full" |
// remove OOS products from related products in WooCommerce, because they are OOS! by Robin Scott of silicondales.com - see more at https://silicondales.com/tutorials/woocommerce/remove-out-of-stock-products-from-woocommerce-related-products/ | |
add_filter( 'woocommerce_related_products', 'exclude_oos_related_products', 10, 3 ); | |
function exclude_oos_related_products( $related_posts, $product_id, $args ){ | |
$out_of_stock_product_ids = (array) wc_get_products( array( | |
'status' => 'publish', | |
'limit' => -1, | |
'stock_status' => 'outofstock', | |
'return' => 'ids', | |
) ); |
Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
<?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 |
// 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 | |
/* | |
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 |
<?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 { |
#!/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, |
# 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 |
<?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. |