Skip to content

Instantly share code, notes, and snippets.

@damiencarbery
damiencarbery / wc-defer-advanced-notifications.php
Last active October 27, 2023 21:31
Defer WooCommerce Advanced Notifications emails for a few minutes - Delay the sending of emails from the Advanced Notification plugin. https://www.damiencarbery.com/2023/10/defer-woocommerce-advanced-notifications-emails-for-a-few-minutes/
<?php
/*
Plugin Name: Defer WooCommerce Advanced Notifications emails for a few minutes
Plugin URI: https://www.damiencarbery.com/2023/10/defer-woocommerce-advanced-notifications-emails-for-a-few-minutes/
Description: Delay the sending of emails from the Advanced Notification plugin for a specified time after the normal delivery time. Use Action Scheduler instead of WP Cron.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.1
*/
@damiencarbery
damiencarbery / days-messages-widget.php
Created September 20, 2023 14:52
Elementor Days Widget - Display different text based on the day of the week. https://www.damiencarbery.com/2023/10/custom-elementor-widget-daily-text/
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// Elementor DaysMessages Widget - Elementor widget that displays different text based on the day of the week.
class Elementor_DaysMessages_Widget extends \Elementor\Widget_Base {
// Set widget internal name.
public function get_name() {
@damiencarbery
damiencarbery / wc-remove-email-order-items-table.php
Created September 18, 2023 10:27
WooCommerce - remove email order details table - Remove the order details table (listing items ordered) from order emails. Optionally remove billing and shipping details.
<?php
/*
Plugin Name: WooCommerce - remove email order details table.
Plugin URI: https://www.damiencarbery.com/2023/09/remove-order-details-from-woocommerce-emails/
Description: Remove the order details table (listing items ordered) from order emails. Optionally remove billing and shipping details.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.1.20230918
*/
@damiencarbery
damiencarbery / elementor-add-to-cart-sold-out.php
Last active September 16, 2023 15:52
Elementor Pro - Change Add to Cart button when sold out - Change Custom Add to Cart button to Sold Out text if product is sold out. https://www.damiencarbery.com/2023/09/change-elementor-pro-add-to-cart-when-sold-out/
<?php
/*
Plugin Name: Elementor Pro - Change Add to Cart button when sold out
Description: Change Custom Add to Cart button to Sold Out text if product is sold out.
Plugin URI: https://www.damiencarbery.com/2023/09/change-elementor-pro-add-to-cart-when-sold-out/
Version: 0.1
Author: Damien Carbery
*/
defined( 'ABSPATH' ) || exit;
@damiencarbery
damiencarbery / disable-generatepress-featured-image.php
Created July 7, 2023 14:25
GeneratePress - do not display featured image - Disable showing featured image in GeneratePress. Primarily for use when the featured image breaks the page layout. https://www.damiencarbery.com/2023/07/generatepress-do-not-display-featured-image/
@damiencarbery
damiencarbery / amelia-on-site-payments.php
Created June 20, 2023 17:37
Amelia: Allow on-site payments for admins - Allow site admin or Amelia Employees/Managers create appointments without making a payment.
<?php
/*
Plugin Name: Amelia: Allow on-site payments for admins
Plugin URI: https://www.damiencarbery.com/2023/06/amelia-allow-on-site-payments-for-admins/
Description: Allow site admin or Amelia Employees/Managers create appointments without making a payment.
Author: Damien Carbery
Version: 0.1
*/
@damiencarbery
damiencarbery / sitemap-exclude-post-type.php
Created March 29, 2023 09:25
Sitemap - exclude a custom post type
<?php
/*
Plugin Name: Sitemap - exclude a custom post type
Plugin URI: https://wpza.net/how-to-exclude-post-types-from-wp-sitemap-xml-in-wordpress/
Description: Exclude a specific custom post type from the WordPress sitemaps.
Version: 0.1
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
*/
@damiencarbery
damiencarbery / genesis-responsive-menu.php
Created March 15, 2023 11:34
For Parallax Pro theme: Add the genesis-responsive-menu class when generating page, to avoid flash of desktop menu on mobile.
<?php
/*
Plugin Name: Genesis Responsive Menu in source (Parallax Pro)
Plugin URI: https://www.damiencarbery.com
Description: For Parallax Pro: Add the genesis-responsive-menu class when generating page, to avoid flash of desktop menu on mobile.
Author: Damien Carbery
Version: 0.1
*/
@damiencarbery
damiencarbery / attach-product-docs-to-cf7-email.php
Last active December 19, 2022 13:05
Attach WooCommerce product docs to Contact Form 7 email - Create a brochure request form to send documents to a customer. https://www.damiencarbery.com/2022/12/attach-woocommerce-product-docs-to-contact-form-7-email/
<?php
/*
Plugin Name: Attach WooCommerce product docs to Contact Form 7 email
Plugin URI: https://www.damiencarbery.com/2022/12/attach-woocommerce-product-docs-to-contact-form-7-email/
Description: Create a brochure request form to send documents to a customer.
Author: Damien Carbery
Version: 0.1
WC tested up to: 7.2.0
*/
@damiencarbery
damiencarbery / genesis-breadcrumb-link-current-view.php
Created December 14, 2022 12:37
Make title a link in Genesis breadcrumbs