Skip to content

Instantly share code, notes, and snippets.

View joelcrump's full-sized avatar

Joel Crump joelcrump

View GitHub Profile
@Garconis
Garconis / force-woocommerce-orders-to-automatically-complete.php
Created August 8, 2019 14:45
WooCommerce | Force orders to auto complete
<?php
/**
* Auto Complete all WooCommerce orders.
*/
add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' );
function custom_woocommerce_auto_complete_order( $order_id ) {
if ( ! $order_id ) {
return;
}
@Garconis
Garconis / woocommerce-remove-extensions-menu.php
Last active May 22, 2023 03:07
WooCommerce | Remove the Extensions menu item from all users except for ones with a certain email address
<?php
/**
* Check if WooCommerce is active
**/
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
add_action('admin_menu', 'fs_remove_admin_menu_links', 999);
function fs_remove_admin_menu_links() {