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
/** | |
* Password reset on sub site (1 of 4) | |
* Replace login page "Lost Password?" urls. | |
* | |
* @param string $lostpassword_url The URL for retrieving a lost password. | |
* @param string $redirect The path to redirect to. | |
* | |
* @return string | |
* | |
* @since 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
<?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
</php | |
/** | |
* Gravity Wiz // Gravity Forms // Prevent Duplicate Submissions from Double Clicks | |
* http://gravitywiz.com/ | |
*/ | |
add_filter( 'gform_pre_render', 'gw_disable_submit' ); | |
function gw_disable_submit( $form ) { | |
if( defined( 'DOING_AJAX' ) && DOING_AJAX ) { | |
return $form; |
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 | |
// UPDATE: Stefan from Stack Overflow has explained a better way to handle cart item data. | |
// See http://stackoverflow.com/a/32327810/470480 | |
// ---------------------- | |
/* | |
Instructions: |
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 | |
// Display variations dropdowns on shop page for variable products | |
add_filter( 'woocommerce_loop_add_to_cart_link', 'woo_display_variation_dropdown_on_shop_page' ); | |
function woo_display_variation_dropdown_on_shop_page() { | |
global $product; | |
if( $product->is_type( 'variable' )) { | |
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 | |
/** | |
* 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( |
NewerOlder