Modifying the download filepath of downloadable files

// Force WooCommerce to believe that the downloadable file exists add_filter( ‘woocommerce_downloadable_file_exists’, ‘__return_true’ ); // Intercept the downloadable file as it is being returned to the customer and return something else function custom_override_product_file_download_path( $file_path, $object, $download_id ) { // Fetch…Continue reading

Force clearing Akismet spam

// Clear the Akismet logs hourly function custom_akismet_schedule_hourly_cron() { // Use wp_next_scheduled to check if the event is already scheduled $timestamp = wp_next_scheduled( ‘custom_akismet_hourly_cron’ ); //If $timestamp == false schedule daily backups since it hasn’t been done previously if( $timestamp…Continue reading

Adding a custom Term Taxonomy-linked export field to the Users export type

function custom_woo_ce_extend_user_fields( $fields = array() ) { $fields[] = array( ‘name’ => ‘user_tag’, ‘label’ => __( ‘User Tag’, ‘woocommerce-exporter’ ), ‘hover’ => __( ‘Custom User field within functions.php’ ) ); return $fields; } add_filter( ‘woo_ce_user_fields’, ‘custom_woo_ce_extend_user_fields’ ); function custom_woo_ce_user_extend( $user…Continue reading