<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Coders Mutant</title>
    <description>The latest articles on DEV Community by Coders Mutant (@codersmutant).</description>
    <link>https://dev.to/codersmutant</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F982073%2Ff452bb6d-9f28-4186-ba4a-f54a2d3e03ca.png</url>
      <title>DEV Community: Coders Mutant</title>
      <link>https://dev.to/codersmutant</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codersmutant"/>
    <language>en</language>
    <item>
      <title>How much will it cost to build an eCommerce website using Shopify and woocommerce</title>
      <dc:creator>Coders Mutant</dc:creator>
      <pubDate>Fri, 23 Dec 2022 19:05:01 +0000</pubDate>
      <link>https://dev.to/codersmutant/how-much-will-it-cost-to-build-an-ecommerce-website-using-shopify-and-woocommerce-1ej8</link>
      <guid>https://dev.to/codersmutant/how-much-will-it-cost-to-build-an-ecommerce-website-using-shopify-and-woocommerce-1ej8</guid>
      <description>&lt;p&gt;The cost of building an eCommerce website using WooCommerce or Shopify will depend on a variety of factors, including the complexity of the website, the features, and functionality you want to include, and the design and branding elements you want to incorporate.&lt;br&gt;
Here are some estimates of the potential costs you may incur when building an e-commerce website using WooCommerce or Shopify.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WooCommerce:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;WooCommerce is a free plugin for WordPress, so you will need to have a WordPress website to use it. Depending on your hosting plan, WordPress hosting can cost anywhere from $3 to $30 per month.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You will also need to purchase a domain name, which typically costs around $10-30 per year.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you want to use a premium WooCommerce theme, you can expect to pay anywhere from $50 to $200 or more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you want to add additional features or functionality to your website, you may need to purchase additional plugins, which can cost anywhere from $50 to $300 or more.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Shopify:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Shopify offers several pricing plans, ranging from $19 to $299 per month(Their basic plan is now at $1 for the first 3 months). The cost you pay will depend on the features and functionality you need for your website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You will also need to purchase a domain name, which typically costs around $10-15 per year.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you want to use a premium Shopify theme, you can expect to pay anywhere from $180 to $350.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you want to add additional features or functionality to your website, you may need to purchase additional apps, which can cost anywhere from $5 to $500 or more.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's important to keep in mind that these are just rough estimates, and the actual &lt;strong&gt;&lt;a href="https://codersmutant.com/ecommerce-website-cost-comparison/" rel="noopener noreferrer"&gt;eCommerce website building cost&lt;/a&gt;&lt;/strong&gt; using WooCommerce or Shopify will depend on your specific needs and goals. It's a good idea to plan out your budget and do some research on the various costs involved before getting started.&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>How to grant download permissions for past woocommerce orders</title>
      <dc:creator>Coders Mutant</dc:creator>
      <pubDate>Sun, 11 Dec 2022 19:19:29 +0000</pubDate>
      <link>https://dev.to/codersmutant/how-to-grant-download-permissions-for-past-woocommerce-orders-4cno</link>
      <guid>https://dev.to/codersmutant/how-to-grant-download-permissions-for-past-woocommerce-orders-4cno</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
/**
 * Plugin Name: Grant download permissions for past WooCommerce orders
 * Plugin URI:  https://github.com/codersmutant/download-permissions-for-past-woocommerce-orders/
 * Description: This plugin grants downloads permissions like WooCommerce 2.6.x, granting permissions for new files added to a downloadable product. 
 * Author:      Coders Mutant
 * Author URI:  https://codersmutant.com/
 * Version:     0.0.3
 * License:     GPLv2 or later
 *
 *
 * @package Grant_Download_Permissions_Like_Legacy_WooCommerce
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
}

/**
 * WooCommerce_Legacy_Grant_Download_Permissions class.
 */
class WooCommerce_Legacy_Grant_Download_Permissions {

    /**
     * Instance of this class.
     *
     * @var object
     */
    protected static $instance = null;

    /**
     * Initialize the plugin actions.
     */
    private function __construct() {
        // Stop if WooCommerce isn't activated.
        if ( ! class_exists( 'WC_Admin_Post_Types', false ) ) {
            return;
        }

        // Remove WooCommerce 3.0 download permission action.
        remove_action( 'woocommerce_process_product_file_download_paths', array( 'WC_Admin_Post_Types', 'process_product_file_download_paths' ), 10, 3 );

        // Backwards compatibility method.
        add_action( 'woocommerce_process_product_file_download_paths', array( $this, 'grant_download_permissions' ), 10, 3 );
    }

    /**
     * Return an instance of this class.
     *
     * @return object A single instance of this class.
     */
    public static function get_instance() {
        // If the single instance hasn't been set, set it now.
        if ( null === self::$instance ) {
            self::$instance = new self;
        }
        return self::$instance;
    }

    /**
     * Grant download permissions like WooCommerce 2.6.
     *
     * This method performs a heavy query and should not be used for anyone!
     *
     * @param int  $product_id          Product identifier.
     * @param int  $variation_id        Optional product variation identifier.
     * @param array $downloadable_files Newly set files.
     */
    public function grant_download_permissions( $product_id, $variation_id, $downloadable_files ) {
        global $wpdb;

        if ( $variation_id ) {
            $product_id = $variation_id;
        }

        if ( ! $product = wc_get_product( $product_id ) ) {
            return;
        }

        $existing_download_ids = array_keys( (array) $product-&amp;gt;get_downloads() );
        $updated_download_ids  = array_keys( (array) $downloadable_files );
        $new_download_ids      = array_filter( array_diff( $updated_download_ids, $existing_download_ids ) );
        $removed_download_ids  = array_filter( array_diff( $existing_download_ids, $updated_download_ids ) );

        if ( ! empty( $new_download_ids ) || ! empty( $removed_download_ids ) ) {
            // Determine whether downloadable file access has been granted via the typical order completion, or via the admin ajax method.
            $existing_orders = $wpdb-&amp;gt;get_col( $wpdb-&amp;gt;prepare( "SELECT order_id from {$wpdb-&amp;gt;prefix}woocommerce_downloadable_product_permissions WHERE product_id = %d GROUP BY order_id", $product_id ) );

            foreach ( $existing_orders as $existing_order_id ) {
                $order = wc_get_order( $existing_order_id );

                if ( $order ) {
                    // Remove permissions.
                    if ( ! empty( $removed_download_ids ) ) {
                        foreach ( $removed_download_ids as $download_id ) {
                            if ( apply_filters( 'woocommerce_process_product_file_download_paths_remove_access_to_old_file', true, $download_id, $product_id, $order ) ) {
                                $wpdb-&amp;gt;query( $wpdb-&amp;gt;prepare( "DELETE FROM {$wpdb-&amp;gt;prefix}woocommerce_downloadable_product_permissions WHERE order_id = %d AND product_id = %d AND download_id = %s", $order-&amp;gt;get_id(), $product_id, $download_id ) );
                            }
                        }
                    }

                    // Add permissions.
                    if ( ! empty( $new_download_ids ) ) {
                        foreach ( $new_download_ids as $download_id ) {
                            if ( apply_filters( 'woocommerce_process_product_file_download_paths_grant_access_to_new_file', true, $download_id, $product_id, $order ) ) {
                                // Grant permission if it doesn't already exist.
                                if ( ! $wpdb-&amp;gt;get_var( $wpdb-&amp;gt;prepare( "SELECT 1=1 FROM {$wpdb-&amp;gt;prefix}woocommerce_downloadable_product_permissions WHERE order_id = %d AND product_id = %d AND download_id = %s", $order-&amp;gt;get_id(), $product_id, $download_id ) ) ) {
                                    wc_downloadable_file_permission( $download_id, $product_id, $order );
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

add_action( 'admin_init', array( 'WooCommerce_Legacy_Grant_Download_Permissions', 'get_instance' ) );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>wordpress</category>
      <category>woocommerce</category>
      <category>ecommerce</category>
    </item>
  </channel>
</rss>
