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
table.wp-list-table tr.updated { animation: highlight 3s ease 2; } | |
@keyframes highlight { | |
0% { background-color: inherit; } | |
50% { background-color: #d1fa88; } | |
100% { background-color: inherit; } | |
} |
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 | |
//don't add above twice if it already exists | |
/** | |
* Check if WooCommerce Page of all kinds (not just cart and shop) | |
* @thanks: https://faish.al/2014/01/06/check-if-it-is-woocommerce-page/ | |
* Checked IDS with WooCommerce Repo 1 June 2019 | |
*/ | |
function ca_is_really_woocommerce_page() { |
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 | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly | |
} | |
function auto_update_specific_plugins( $update, $item ) { | |
// Array of plugin slugs to always auto-update | |
$plugins = array( | |
'dummy-plugin', |
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 | |
//////////////////////////////////////////// | |
// Manage WooCommerce styles and scripts. // | |
//////////////////////////////////////////// | |
function woocommerce_script_cleaner() { | |
// Remove the generator tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); | |
// remove definitly, no need of this one | |
/////////////////////////////////////////////////// |
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 to sum two arrays | |
* | |
* @param array $a First array to merge | |
* @param array $b Second array to merge which gonna be returned by function | |
* | |
* @author Orlando Villegas Galán <[email protected]> | |
* @return $b | |
*/ |
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 | |
/** | |
* This adds back an option to resend the admin new order email from the order edit screen that was removed in WooCommerce 3.2 | |
*/ | |
/** | |
* Filter to add a new menu to the dropdown | |
* | |
* @param array $actions | |
* @return 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 | |
/* | |
This script will allow you to send a custom email from anywhere within wordpress | |
but using the woocommerce template so that your emails look the same. | |
Created by [email protected] on 27th of July 2017 | |
Put the script below into a function or anywhere you want to send a custom email | |
*/ |
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 | |
/** | |
* I've published a fully-tested Composer library with type-casting. | |
* @see https://github.com/simivar/reverse-print-r | |
*/ | |
/** | |
* Matt: core | |
* Trixor: object handling | |
* lech: Windows suppport |
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 a Purchased Column w/ Item Quantity, SKU, Name, & Meta to the Admin Orders Table **/ | |
class ThemeWooCommerce | |
{ | |
/* Add a `Purchased` Column to the Admin Orders Table */ | |
public static function add_purchased_column_header($columns) { | |
$new_columns = array(); | |
foreach ($columns as $key => $title) { | |
if ($key === 'billing_address') { | |
$new_columns['order_items'] = __('Purchased', '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
add_filter('manage_edit-shop_order_columns', 'wc_custom_purchased_column'); | |
function wc_custom_purchased_column($columns) | |
{ | |
$new_array = array(); | |
foreach ($columns as $key => $title) { | |
if ($key == 'billing_address') { | |
$new_array['order_items'] = __('Purchased', 'woocommerce'); | |
} |
NewerOlder