add_action(‘wp_head’, function() { echo ‘‘; echo ‘‘; echo ‘‘; });Continue reading
add_action(‘woocommerce_product_set_stock’, function($product) { do_action(‘wc_product_stock_updated’, [ ‘id’ => $product->get_id(), ‘sku’ => $product->get_sku(), ‘qty’ => $product->get_stock_quantity(), ‘status’ => $product->get_stock_status(), ]); }, 10, 1); add_action(‘woocommerce_variation_set_stock’, function($product) { do_action(‘wc_product_stock_updated’, [ ‘id’ => $product->get_id(), ‘parent_id’ => $product->get_parent_id(), ‘sku’ => $product->get_sku(), ‘qty’ => $product->get_stock_quantity(), ‘status’ =>…Continue reading
/** * WP All Import: only update a post if the feed’s updated_at is NEWER than the WP post’s modified date. * Network-activate this snippet for multisite if you run imports on subsites. */ add_filter(‘wp_all_import_is_post_to_update’, function ($continue_import, $post_id, $data, $import_id)…Continue reading
/** * Subsite Post Status Report (WPCode snippet ready) * * Adds a Site Admin page: Tools → Post Status Report * – Shows counts of posts by post_status for the selected post type * – Each status is a…Continue reading
add_action(‘update_option_woocommerce_stripe_settings’, function($old_value, $value, $option) { if (!isset($old_value[‘testmode’]) || !isset($value[‘testmode’])) { return; } if ($old_value[‘testmode’] === $value[‘testmode’]) { return; } $optionName = ‘woocommerce_stripe_testmode_log’; $entry = [ ‘time’ => current_time(‘mysql’), ‘uri’ => $_SERVER[‘REQUEST_URI’] ?? ”, ‘hook’ => current_filter(), ‘old’ => $old_value[‘testmode’], ‘new’…Continue reading
add_action(‘init’, function () { remove_action(‘wp_head’,’print_emoji_detection_script’,7); remove_action(‘wp_print_styles’,’print_emoji_styles’); remove_action(‘wp_head’,’wp_oembed_add_discovery_links’,10); remove_action(‘wp_head’,’rest_output_link_wp_head’,10); });Continue reading