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 // only copy this line if needed | |
/** | |
* Auto Complete all WooCommerce virtual orders. | |
* | |
* @param int $order_id The order ID to check | |
* @return void | |
*/ | |
function custom_woocommerce_auto_complete_virtual_orders( $order_id ) { |
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
/** | |
* Schedule the daily event if necessary. | |
*/ | |
function schedule_delete_expired_coupons() { | |
if ( ! wp_next_scheduled( 'delete_expired_coupons' ) ) { | |
wp_schedule_event( time(), 'daily', 'delete_expired_coupons' ); | |
} | |
} | |
add_action( 'init', 'schedule_delete_expired_coupons' ); |
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: Remove WooCommerce DB Notice | |
* Plugin URI: https://woocommerce.com | |
* Description: Clears out any pending WooCommerce DB Update notices | |
* Author: WooCommerce | |
* Domain Path: /languages | |
* 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 | |
/** | |
* @package Custom_WC_Status | |
* @version 1.6 | |
*/ | |
/* | |
Plugin Name: Custom WooCommerce Status | |
Description: This is a custom plugin for woocommerce. This will add some custom bulk action in order listing. | |
Author: Luke Cavanagh | |
Version: 1.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
// Uses apply_filters( 'woocommerce_debug_tools', $tools ) | |
add_filter( 'woocommerce_debug_tools', 'woocommerce_debug_tools_remove_logs' ); | |
function woocommerce_debug_tools_remove_logs( $tools ) { | |
// Disbale Remove Logs button | |
$disable_remove_logs = apply_filters( 'woocommerce_disable_woocommerce_debug_tools_remove_logs', FALSE ); | |
if( !$disable_remove_logs ) { | |
$tools['remove_logs'] = array( |
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: Disable PayPal for WooCommerce Plugin | |
Plugin URI: https://github.com/lukecav | |
Description: Disable PayPal for WooCommerce plugin on all pages other than cart and checkout. | |
Author: Luke Cavanagh | |
Version: 1.0.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
/** | |
* Will change the minutes it takes an In Cart booking to expire. | |
* This example reduces the number from 60 to 5. | |
* | |
* @param int $minutes 60 is the default passed | |
* @return int The amount of minutes you'd like to have In Cart bookings expire on. | |
*/ | |
function change_incart_bookings_expiry_minutes( $minutes ) { | |
return 5; | |
} |
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 | |
function gf_change_first_name( $label, $form_id ){ | |
return "First Name"; | |
} | |
add_filter( 'gform_name_first', 'gf_change_first_name', 10, 2 ); | |
function gf_change_last_name( $label, $form_id ){ | |
return "Last Name"; | |
} | |
add_filter( 'gform_name_last', 'gf_change_last_name', 10, 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
wp comment list --field=comment_ID --'comment_author'='ActionScheduler' --number=1000 | xargs wp comment delete --force | |
wp post list --field=ID --post_type=scheduled-action --posts_per_page=1000 | xargs wp post delete --force | |
wp post list --field=ID --post_type=scheduled-action --posts_per_page=1000 --post_status=trash | xargs wp post delete --force | |
wp post list --field=ID --post_type=scheduled-action --posts_per_page=1000 --post_status=cancel | xargs wp post delete --force |
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 | |
add_action( 'wp_enqueue_scripts', function() { | |
if ( ! dokan_is_store_page() ) { | |
return; | |
} | |
wp_enqueue_style('dokan-magnific-popup'); | |
wp_enqueue_script('dokan-popup'); | |
} ); |
NewerOlder