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 Disable Divi Image Size Generation On Upload | |
* @author https://gist.github.com/Acephalia | |
* @caffeinate https://buymeacoffee.com/acephaliax | |
*/ | |
function disable_divi_image_sizes() { | |
// Remove all image sizes registered by Divi | |
remove_image_size('et-pb-post-main-image'); // Divi's post main image size | |
remove_image_size('et-pb-portfolio-image'); // Divi's portfolio image size |
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 Resend WooCommerce new order notification to admin when order status changes to processing | |
* @author https://gist.github.com/Acephalia | |
* @caffeinate https://buymeacoffee.com/acephaliax | |
*/ | |
// Allow resending of New Order emails | |
add_filter('woocommerce_new_order_email_allows_resend', '__return_true'); | |
// Resend New Order notification when order status changes to processing |
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 WooCommerce Add CC Address To Order Processing Email | |
* @description This snippet will allow you to send the order processing email to a secondary email as a CC | |
* @author u/acephaliax | |
* @caffeinate https://buymeacoffee.com/acephaliax | |
*/ | |
add_filter('woocommerce_email_headers', 'add_cc_to_processing_order_email', 10, 3); | |
function add_cc_to_processing_order_email($headers, $email_id, $order) { |
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 Extend WooCommerce search to include tags, descriptions and price | |
* @author u/acephaliax | |
* @source https://insomniainc.com/resources/code-snippets/woocommerce/how-to-extend-woocommerce-search-results-to-show-product-tags-descriptions-sku-and-price/ | |
* @compatibility Last tested on WooCommerce 9.0.1 | |
* @community r/wordpress, r/woocommerce | |
* @caffeinate https://buymeacoffee.com/acephaliax | |
*/ | |
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 Display Variation Selectors & Add To Cart Button For Variable Products On Woocommerce Shop Pages | |
* @author u/acephaliax | |
* @source https://insomniainc.com/resources/uncategorized/variation-selectors-add-to-cart-button-for-variable-products-on-woocommerce-shop-pages/ | |
* @compatibility Last tested on WooCommerce 9.0.1 | |
* @community r/wordpress, r/woocommerce | |
* @caffeinate https://buymeacoffee.com/acephaliax | |
*/ | |
// Enqueue necessary scripts for shop and archive pages |
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 Show WooCommerce Price on LearnDash Course Page | |
* @description This code retrieves the WooCommerce price associated with a LearnDash course and displays it on the course page, replacing the default "No Price" label. It also provides a shortcode to manually display the price on any page. | |
* @author u/acephaliax | |
* @source https://insomniainc.com/resources/ | |
* @compatibility Last tested on WooCommerce 9.0.1 | |
* @community r/wordpress, r/woocommerce | |
* @caffeinate https://buymeacoffee.com/acephaliax | |
*/ |
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 Display and Truncate Woocomemrce Short Description On Shop And Archive Loops | |
* @description This snippet will add a product's short description to the archive and loop pages. The short description will be truncated via pure CSS and expanded on hover. | |
* @author u/acephaliax | |
* @source https://insomniainc.com/resources/ | |
* @compatibility Last tested on WooCommerce 9.0.1 | |
* @community r/wordpress, r/woocommerce | |
* @caffeinate https://buymeacoffee.com/acephaliax | |
*/ |
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 WooCommerce Blur Product Images With Tag + Enable or Disable In My Account | |
* @description This snippet will redirect a user to a seperate page depending on created order status. | |
* @author u/acephaliax | |
* @source. https://insomniainc.com/resources/code-snippets/woocommerce/blur-woocommerce-product-images-my-account-page-blur-toggle/ | |
* @compatiblity Last tested on WooCommerce 8.9.2 | |
* @community r/wordpress, r/woocommerce | |
* @caffeinate https://buymeacoffee.com/acephaliax | |
*/ |
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 WooCommerce Redirect Thank You Page Based On Order Status | |
* @description This snippet will redirect a user to a seperate page depending on created order status. | |
* @author u/acephaliax | |
* @source. https://gist.github.com/Acephalia/cf80e9a154cb6989590518040371c79e | |
* @compatiblity Last tested on WooCommerce 8.9.2 | |
* @community r/wordpress, r/woocommerce | |
* @caffeinate https://buymeacoffee.com/acephaliax | |
*/ |
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
//If you'd be inclined to support the support you can caffeinate me at https://buymeacoffee.com/acephaliax | |
// Apply globally via Divi > Theme Options > Integrations > Head or via code module to both Blog and All Posts templates in theme builder. | |
<script type="text/javascript"> | |
document.addEventListener("DOMContentLoaded", function() { | |
// Remove quotation marks from the direct text content of elements with class "entry-title" | |
const titleElement = document.querySelector(".entry-title"); | |
if (titleElement) { | |
titleElement.textContent = titleElement.textContent.replace(/^“|”$/g, ''); | |
} |
NewerOlder