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
<?php | |
/* | |
Plugin Name: Convert WooCommerce order note to custom field | |
Plugin URI: https://www.damiencarbery.com/ | |
Description: Parse order notes to extract a shipping tracking number, creating a custom field if found. | |
Author: Damien Carbery | |
Version: 0.2 | |
*/ | |
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
<?php | |
$weights = array( -6, 0, 2, 4, 6, 8, 10, 12, 13, 17, 18, 21, 24, 29, 30, 31 ); | |
$min_weight = 6; | |
$increments = 6; | |
foreach ( $weights as $weight ) { | |
echo "Weight: $weight\n"; | |
// Check if divisible by $increments. | |
if ( $weight % $increments == 0 ) { |
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
<?php | |
/* | |
Plugin Name: Create a new admin user programmatically | |
Plugin URI: https://www.damiencarbery.com/2022/11/create-a-new-admin-user-programmatically/ | |
Description: If you have ftp access you can create an admin user for yourself. | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |
// Code originally from https://wphub.me/create-new-wordpress-admin-user-programmatically/ |
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
<?php | |
/* | |
Plugin Name: Add Featured Image column to Posts admin page | |
Plugin URI: https://www.damiencarbery.com/2022/11/add-featured-image-column-to-posts-admin-page/ | |
Description: Easily see whether a post has a featured image set. | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |
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
<?php | |
/* | |
Plugin Name: Attach WooCommerce download docs to Contact Form 7 email | |
Plugin URI: https://www.damiencarbery.com/ | |
Description: Use a CF7 filter to attach a WooCommerce product's downloadable files to the email. | |
Author: Damien Carbery | |
Version: 0.2 | |
*/ | |
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
<?php | |
/* | |
Plugin Name: Copy WooCommerce order shipping address to clipboard | |
Plugin URI: https://www.damiencarbery.com/2022/11/copy-woocommerce-order-shipping-address-to-clipboard/ | |
Description: Copy the shipping (or billing) address, email, phone number, full name or order number to the clipboard for pasting in another application. A WooCommerce Community member asked how to add a button to the order admin page to copy the shipping address to the clipboard. Asked on <a href="https://www.facebook.com/groups/advanced.woocommerce/permalink/6233848903296143/">WooCommerce Community Facebook group</a>. | |
Author: Damien Carbery | |
Version: 0.7.20250409 | |
WC tested up to: 9.7.1 | |
Requires Plugins: woocommerce | |
*/ |
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
<?php | |
/* | |
Plugin Name: WooCommerce - Show shipping method IDs | |
Plugin URI: https://www.damiencarbery.com/2022/10/show-shipping-method-ids-in-woocommerce/ | |
Description: List shipping zones, shipping methods and their IDs for use in custom code. | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |
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
<?php | |
/* | |
Plugin Name: WooCommerce Shipping Classes column to Products listing | |
Plugin URI: https://www.damiencarbery.com/2022/10/add-shipping-classes-column-to-products-admin-page/ | |
Description: Add a Shipping Class column to the WooCommerce Products listing pages. Requested in WooCommerce Community Facebook group: https://www.facebook.com/groups/advanced.woocommerce/posts/6186336834714017/. Inspired by https://www.conicsolutions.net/tutorials/woocommerce-how-to-add-custom-columns-on-the-products-list-in-dashboard/ | |
Author: Damien Carbery | |
Version: 0.2 | |
*/ | |
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
<?php | |
/* | |
Plugin Name: Events Manager - List event attendees shortcode | |
Plugin URI: https://www.damiencarbery.com/ | |
Description: Experiment with listing the attendees of an Events Manager event. | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |
add_shortcode( 'event_attendees', 'dcwd_event_attendees' ); |
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
<?php | |
/* | |
Plugin Name: Show GP Premium Elements by date range | |
Plugin URI: https://www.damiencarbery.com/2022/10/show-gp-premium-elements-by-date-range/ | |
Description: Add CMB2 metabox to show a GP Premium Element in a chosen date range. | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |