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 option get itsec-storage --format=json |
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
function action_woocommerce_low_stock( $wc_get_product ) { | |
// Product set tag id(s), multiple IDs can be added, separated by a comma | |
$wc_get_product->set_tag_ids( array( 'YOUR TAG ID' ) ); | |
// OPTIONAL: Set category ids | |
//$wc_get_product->set_category_ids( array( 39, 2 ) ); | |
// Save | |
$wc_get_product->save(); | |
} |
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
function reset_product_template( $post_type_args ) { | |
if ( array_key_exists( 'template', $post_type_args ) ) { | |
unset( $post_type_args['template'] ); | |
} | |
return $post_type_args; | |
} | |
add_filter( 'woocommerce_register_post_type_product', 'reset_product_template' ); |
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
<IfModule pagespeed_module> | |
ModPagespeed on | |
ModPagespeedEnableFilters recompress_jpeg,recompress_png | |
ModPagespeedEnableFilters recompress_webp | |
ModPagespeedEnableFilters convert_gif_to_png,convert_jpeg_to_progressive | |
ModPagespeedEnableFilters convert_jpeg_to_webp,convert_png_to_jpeg | |
ModPagespeedEnableFilters jpeg_subsampling | |
ModPagespeedEnableFilters strip_image_color_profile,strip_image_meta_data | |
</IfModule> |
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 user list --role=administrator --format=csv | |
wp user reset-password $(wp user list --fields=ID --role=administrator) | |
wp user reset-password $(wp user list --fields=ID --role=administrator) -skip-email | |
wp config shuffle-salts | |
wp plugin update --all | |
wp theme update --all |
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( 'woocommerce_loop_add_to_cart_link', 'add_to_cart_dofollow', 10, 2 ); | |
function add_to_cart_dofollow($html, $product){ | |
$html = sprintf( '<a rel="dofollow" href="%s" data-quantity="%s" data-product_id="%s" data-product_sku="%s" class="%s">%s</a>', | |
esc_url( $product->add_to_cart_url() ), | |
esc_attr( isset( $quantity ) ? $quantity : 1 ), | |
esc_attr( $product->get_id() ), | |
esc_attr( $product->get_sku() ), | |
esc_attr( isset( $class ) ? $class : 'button' ), | |
esc_html( $product->add_to_cart_text() ) | |
); |
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( 'woocommerce_email_order_items_args', 'remove_product_image_from_order_email' ); | |
function remove_product_image_from_order_email( $args ) { | |
$args['show_image'] = false; | |
return $args; | |
} |
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( 'woocommerce_price_format', 'add_currency_suffix', 10, 2 ); | |
function add_currency_suffix( $price, $currency_symbol ) { | |
// Only add the suffix on cart and checkout pages | |
if ( is_cart() || is_checkout() ) { | |
// Get the current currency code | |
$currency = get_woocommerce_currency(); |
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( 'yarpp_add_image_size', '__return_false' ); |
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 cron event delete jetpack_v2_heartbeat |