Skip to content

Instantly share code, notes, and snippets.

@damiencarbery
damiencarbery / acf-date-time-picker-start-end-date-twinned.php
Last active Nov 22, 2021
ACF Date Time Picker – set end date to after start date - With two related Date Time Picker fields limit the end date to be after the start date. https://www.damiencarbery.com/2021/10/acf-date-time-picker-set-end-date-to-after-start-date/
View acf-date-time-picker-start-end-date-twinned.php
<?php
/*
Plugin Name: ACF Date Time Picker - set end date to after start date
Plugin URI: https://www.damiencarbery.com/2021/10/acf-date-time-picker-set-end-date-to-after-start-date/
Description: With two related Date Time Picker fields limit the end date to be after the start date.
Author: Damien Carbery
Version: 0.2
*/
View wc-sale-price-first-google-merchant.php
<?php
/*
Plugin Name: WooCommerce Sale Price First
Plugin URI: https://www.damiencarbery.com/
Description: Move the Sale Price to be before the Normal Price in the html but display as Normal-then-Sale. This is because Google Merchant is not reading the sale price.
Author: Damien Carbery
Version: 0.1
*/
View wc-product-meta-to-order-details.php
<?php
/*
Plugin Name: Product custom field to order details
Plugin URI: https://www.damiencarbery.com/
Description: Add a product custom field to the order details page - an experiment for a Facebook question.
Author: Damien Carbery
Version: 0.1
*/
@damiencarbery
damiencarbery / elementor-percentage-circle.php
Last active Jun 9, 2021
Elementor - Percentage circle widget - An Elementor widget for a Percentage circle where the circle is complete to the specific percentage. https://www.damiencarbery.com/2021/06/elementor-percentage-circle-widget/
View elementor-percentage-circle.php
<?php
/*
Plugin Name: Elementor - Percentage circle widget
Description: An Elementor widget for a Percentage circle where the circle is complete to the specific percentage.
Plugin URI: https://www.damiencarbery.com/2021/06/percentage-circle-block-for-elementor/
Version: 0.1
Author: Damien Carbery
*/
@damiencarbery
damiencarbery / elementor-remove-html-for-hidden-widget.php
Last active Jun 1, 2021
Elementor - Remove markup for hidden element - Remove the markup for an element that is set to hidden on desktop, table and mobile. https://www.damiencarbery.com/2021/06/elementor-remove-markup-of-hidden-element/
View elementor-remove-html-for-hidden-widget.php
<?php
/*
Plugin Name: Elementor - Remove markup for hidden element
Description: Remove the markup for an element that is set to hidden on desktop, table and mobile.
Plugin URI: https://www.damiencarbery.com/2021/06/elementor-remove-markup-of-hidden-element/
Version: 0.1
Author: Damien Carbery
*/
defined( 'ABSPATH' ) || exit;
@damiencarbery
damiencarbery / wc-disable-product-link-in-order-page.php
Last active May 24, 2021
WooCommerce disable product link in Order page - Disable link to product in WooCommerce Order page (in My Account area). https://www.damiencarbery.com/2021/05/disable-product-link-in-woocommerce-order-page/
View wc-disable-product-link-in-order-page.php
@damiencarbery
damiencarbery / attach-order-files-to-wc-order-email.php
Last active Oct 7, 2021
Attach files to WooCommerce order email - Upload files to an order to attach them to the WooCommerce Order Completed email.
View attach-order-files-to-wc-order-email.php
<?php
/*
Plugin Name: Attach files to WooCommerce order email
Plugin URI: https://www.damiencarbery.com/2021/05/attach-files-to-woocommerce-order-email/
Description: Upload files to an order to attach them to the WooCommerce Order Completed email.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.1
*/
@damiencarbery
damiencarbery / genesis-hide-old-post-dates.php
Last active Feb 14, 2021
Genesis Hide Old Post Dates - Do not show post date on posts older than 30 days.
View genesis-hide-old-post-dates.php
<?php
/*
Plugin Name: Genesis Hide Old Post Dates
Plugin URI: https://www.damiencarbery.com/2021/02/hide-old-post-dates-in-genesis/
Description: Do not show post date on posts older than 30 days.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.2
*/
View delete-orders.php
<?php
/*
// Restrict who can access this script.
$permitted_ips = array('12.34.56.78', '87.65.43.21');
if (in_array($_SERVER['REMOTE_ADDR'], $permitted_ips) == false) {
header('HTTP/1.0 403 Forbidden');
die();
}
*/
View acf-percentage-circle.php
<?php
/*
Plugin Name: ACF - Percentage Circle
Plugin URI: https://www.damiencarbery.com/2020/11/percentage-circle-block/
Description: Block to display a percentage circle with animation. Based on: https://codepen.io/sergiopedercini/pen/jmKdbj
Author: Damien Carbery
Version: 0.1
*/