Category: Admin
performance
add_action(‘init’, function () { remove_action(‘wp_head’, ‘wp_resource_hints’, 2, 99); }); /** * Disable emojis */ add_action(‘init’, function () { remove_action(‘wp_head’, ‘print_emoji_detection_script’, 7); remove_action(‘admin_print_scripts’, ‘print_emoji_detection_script’); remove_action(‘wp_print_styles’, ‘print_emoji_styles’); remove_action(‘admin_print_styles’, ‘print_emoji_styles’); remove_filter(‘the_content_feed’, ‘wp_staticize_emoji’); remove_filter(‘comment_text_rss’, ‘wp_staticize_emoji’); remove_filter(‘wp_mail’, ‘wp_staticize_emoji_for_email’); add_filter(‘tiny_mce_plugins’, function ($plugins) { if (is_array($plugins)) {…Continue reading
add_custom_javascript_review_sites
function add_custom_javascript() { // Check if we’re on a single post or page if(is_singular()) { // Get the post ID of the current post or page $post_id = get_the_ID(); // Check if the custom field ‘funnel’ exists and get its…Continue reading
disable_content_title_for_all_posts
function disable_content_title_for_all_posts() { $args = array( ‘post_type’ => ‘post’, ‘posts_per_page’ => -1, ‘fields’ => ‘ids’, // Only get post IDs to improve performance ); $posts = get_posts($args); foreach ($posts as $post_id) { // Assuming ‘_disable_title’ is the meta key and…Continue reading
Exporting custom meta
function custom_woo_ce_extend_product_fields( $fields ) { $fields[] = array( ‘name’ => ‘my_custom_field’, ‘label’ => __( ‘My Custom Field’, ‘woo_ce’ ) ); return $fields; } add_filters( ‘woo_ce_product_fields’, ‘custom_woo_ce_extend_product_fields’ );Continue reading
Exporting custom meta
function woo_ce_extend_product_item( $product, $product_id ) { $product->my_custom_field = get_post_meta( $product_id, ‘_my_custom_field’, true ); return $product; } add_filter( ‘woo_ce_product_item’, ‘custom_woo_ce_extend_product_item’, 10, 2 );Continue reading
Editing Scheduled Export e-mail content
function custom_woo_ce_email_contents( $content = ” ) { // Change the below text so whatever you prefer $content = ‘Please find attached your export ready to review.’; // wpautop() changes double line-breaks in the text into HTML paragraphs $content = wpautop(…Continue reading
Adding static Order fields to the Orders export type
function custom_woo_ce_order_fields( $fields ) { $fields[] = array( ‘name’ => ‘static_field’, ‘label’ => __( ‘Static Field’, ‘woo_ce’ ), ‘hover’ => __( ‘Static Field within functions.php’, ‘woo_ce’ ) ); return $fields; } add_filter( ‘woo_ce_order_fields’, ‘custom_woo_ce_order_fields’ ); function custom_woo_ce_order( $order, $order_id )…Continue reading
Override the default Product Brand Term Taxonomy detection in Store Exporter Deluxe
function custom_woo_ce_brand_term_taxonomy() { // Term Taxonomy of Brands used within your WooCommerce store, defaults to product_brand return ‘brand’; } add_filter( ‘woo_ce_brand_term_taxonomy’, ‘custom_woo_ce_brand_term_taxonomy’, 11 );Continue reading
Switching between ftp_put and ftp_fput FTP upload methods in Store Exporter Deluxe
function custom_woo_ce_cron_export_ftp_switch() { // ftp_put or ftp_fput return ‘ftp_fput’; } add_filter( ‘woo_ce_cron_export_ftp_switch’, ‘custom_woo_ce_cron_export_ftp_switch’ );Continue reading