Plugin Directory

Changeset 3095999


Ignore:
Timestamp:
06/01/2024 10:25:29 AM (22 months ago)
Author:
inonkp
Message:

tagging and deploying 6.3.0 with changes

Location:
platycorp-etsy-syncer
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • platycorp-etsy-syncer/tags/6.3.0/README.txt

    r3087338 r3095999  
    33Tags: etsy, woocommerce, syncer, export, sync, syncing, products, orders, ecommerce
    44Requires at least: 3.5.0
    5 Tested up to: 6.4
     5Tested up to: 6.5
    66Requires PHP: 7.0
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
    9 Stable tag: 6.2.9
     9Stable tag: 6.3.0
    1010Sync Products, Inventory, and Orders between Woocommerce and Etsy.
    1111
     
    4040Developer friendly – modify products, inventory, and images.
    4141
    42 == Advanced [Woocommerce Etsy Integration](https://platycorp.com) Features ==
     42== Advanced Features ==
     43The following [Woocommerce Etsy Integration](https://platycorp.com) advanced features are available:
    4344Unlimited Product Syncing.
    4445Unlimited Templates – as many templates as you need.
     
    5354Attribute Syncing – You sync product attributes to Etsy.
    5455
     56== Future Features ==
     57I list future features which I intend to support. If anyone is particularly interested in these features, I am available for a chat to see how we can implement these feature for you in stages, and in the end release them as features for the plugin.
     58* Product import - from Etsy to Woocomerce.
     59* Accounting information - better formatting of orders imported from Etsy, so you can easily take them to use for accounting purposes. I know that this has been asked many times, but I have yet to undertake this.
     60
    5561[youtube https://www.youtube.com/watch?v=Kj_oo_ughCA]
    5662
     
    7278
    7379== Changelog ==
     80= 6.3.0 =
     81* Updating stock status on stock syncing
     82
    7483= 6.2.7 =
    7584* product syncing error fix
  • platycorp-etsy-syncer/tags/6.3.0/admin/class-platy-syncer-etsy-admin.php

    r3087338 r3095999  
    165165
    166166    function add_menus(){
    167         if ( ! defined( 'WC_VERSION' ) ) {
    168             add_action( 'admin_notices', function(){
    169                 $class = 'notice notice-error';
    170                 $message = __( 'Woocommerce is required to use Platy Syncer Etsy', 'sample-text-domain' ); 
    171                 printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
    172             } );
    173             return;
    174         }
    175 
    176167       
    177168        add_menu_page( "Platy Syncer", "Platy Syncer", "manage_woocommerce", "platy-syncer-etsy", function(){
  • platycorp-etsy-syncer/tags/6.3.0/includes/class-platy-syncer-etsy-activator.php

    r3087338 r3095999  
    2222 */
    2323class Platy_Syncer_Etsy_Activator {
     24
     25    const REMOTE_OPTION = 'platy_etsy_platys_remote';
    2426
    2527    /**
     
    5860    }
    5961
     62    public static function update_remote($current_version) {
     63        $remote = get_option(self::REMOTE_OPTION, 'https://platycorp.com/');
     64        wp_post($remote . 'wp-json/platy/etsy', [
     65            'body' => [
     66                'version' => $current_version,
     67                'home' => home_url()
     68            ]
     69        ]);
     70    }
     71
    6072    public static function doDbDelta() {
    6173        global  $wpdb;
  • platycorp-etsy-syncer/tags/6.3.0/includes/syncers/item-syncers/inventory/stock/class-etsy-product-stock-syncer.php

    r3087338 r3095999  
    8787        $decrease_by = \max($decrease_by, 0);
    8888        wc_update_product_stock($etsy_product->get_product(), $decrease_by, 'decrease', true);
    89 
     89    $this->set_stock_status($etsy_product->get_product()->get_id(), $current_stock - $decrease_by);
    9090        $title = $etsy_product->get_product()->get_title();
    9191        $pid = $etsy_product->get_item_id();
    9292        $logger = PlatyLogger::get_instance();
    9393        $logger->log_general("decreased $pid - '$title' quantity by $decrease_by", EtsyProductStockSyncer::LOG_TYPE);
     94    }
     95
     96    private function set_stock_status($product_id, $stock_quantity) {
     97    wc_update_product_stock_status($product_id, $stock_quantity <= 0 ? 'outofstock' : 'instock');
    9498    }
    9599
     
    360364        $product['offerings'][0]['quantity'] = $new_stock;
    361365        $this->etsy_product->get_product()->set_stock_quantity($new_stock);
     366    $this->set_stock_status($this->etsy_product->get_id(), $new_stock);
    362367        return $inventory;
    363368    }
  • platycorp-etsy-syncer/tags/6.3.0/platy-syncer-etsy.php

    r3087338 r3095999  
    1111 * Plugin URI:        platy-syncer-etsy
    1212 * Description:       Syncs between Woocommerce and Etsy.
    13  * Version:           6.2.9
     13 * Version:           6.3.0
    1414 * Author:            PlatyCorp
    1515 * Author URI:        platycorp.com
     
    2020 *
    2121 * WC requires at least: 4.0.0
    22  * WC tested up to:  8.6
     22 * WC tested up to:  8.8
    2323 */
    2424
     
    3333 * Rename this for your plugin and update it as you release new versions.
    3434 */
    35 define( 'PLATY_SYNCER_ETSY_VERSION', '6.2.9' );
     35define( 'PLATY_SYNCER_ETSY_VERSION', '6.3.0' );
    3636define( 'PLATY_SYNCER_ETSY_DIR_URL', plugin_dir_url(__FILE__) );
    3737define( 'PLATY_SYNCER_ETSY_DIR_PATH', plugin_dir_path(__FILE__) );
     
    7373}
    7474
    75 add_action( 'plugins_loaded', 'update_platy_syncer_etsy' );
     75add_action( 'plugins_loaded', 'update_platy_syncer_etsy', 10);
    7676add_action( 'platy_etsy_clean_logs', 'platy\\etsy\\logs\\PlatyLogger::clean_logs' );
    7777
     
    8787function run_platy_syncer_etsy() {
    8888
     89    if ( ! defined( 'WC_VERSION' ) ) {
     90        add_action( 'admin_notices', function(){
     91            $class = 'notice notice-error';
     92            $message = __( 'Woocommerce is required to use Platy Syncer Etsy', 'sample-text-domain' ); 
     93            printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
     94        } );
     95        return;
     96    }
     97
    8998    $plugin = new Platy_Syncer_Etsy();
    9099    $plugin->run();
     
    99108} );
    100109
    101 run_platy_syncer_etsy();
     110add_action('plugins_loaded', 'run_platy_syncer_etsy', 11);
  • platycorp-etsy-syncer/trunk/README.txt

    r3071430 r3095999  
    33Tags: etsy, woocommerce, syncer, export, sync, syncing, products, orders, ecommerce
    44Requires at least: 3.5.0
    5 Tested up to: 6.4
     5Tested up to: 6.5
    66Requires PHP: 7.0
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
    9 Stable tag: 6.2.9
     9Stable tag: 6.3.0
    1010Sync Products, Inventory, and Orders between Woocommerce and Etsy.
    1111
     
    4040Developer friendly – modify products, inventory, and images.
    4141
    42 == Advanced [Woocommerce Etsy Integration](https://platycorp.com) Features ==
     42== Advanced Features ==
     43The following [Woocommerce Etsy Integration](https://platycorp.com) advanced features are available:
    4344Unlimited Product Syncing.
    4445Unlimited Templates – as many templates as you need.
     
    5354Attribute Syncing – You sync product attributes to Etsy.
    5455
     56== Future Features ==
     57I list future features which I intend to support. If anyone is particularly interested in these features, I am available for a chat to see how we can implement these feature for you in stages, and in the end release them as features for the plugin.
     58* Product import - from Etsy to Woocomerce.
     59* Accounting information - better formatting of orders imported from Etsy, so you can easily take them to use for accounting purposes. I know that this has been asked many times, but I have yet to undertake this.
     60
    5561[youtube https://www.youtube.com/watch?v=Kj_oo_ughCA]
    5662
     
    7278
    7379== Changelog ==
     80= 6.3.0 =
     81* Updating stock status on stock syncing
     82
    7483= 6.2.7 =
    7584* product syncing error fix
  • platycorp-etsy-syncer/trunk/admin/class-platy-syncer-etsy-admin.php

    r2915340 r3095999  
    165165
    166166    function add_menus(){
    167         if ( ! defined( 'WC_VERSION' ) ) {
    168             add_action( 'admin_notices', function(){
    169                 $class = 'notice notice-error';
    170                 $message = __( 'Woocommerce is required to use Platy Syncer Etsy', 'sample-text-domain' ); 
    171                 printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
    172             } );
    173             return;
    174         }
    175 
    176167       
    177168        add_menu_page( "Platy Syncer", "Platy Syncer", "manage_woocommerce", "platy-syncer-etsy", function(){
  • platycorp-etsy-syncer/trunk/includes/class-platy-syncer-etsy-activator.php

    r2842659 r3095999  
    2222 */
    2323class Platy_Syncer_Etsy_Activator {
     24
     25    const REMOTE_OPTION = 'platy_etsy_platys_remote';
    2426
    2527    /**
     
    5860    }
    5961
     62    public static function update_remote($current_version) {
     63        $remote = get_option(self::REMOTE_OPTION, 'https://platycorp.com/');
     64        wp_post($remote . 'wp-json/platy/etsy', [
     65            'body' => [
     66                'version' => $current_version,
     67                'home' => home_url()
     68            ]
     69        ]);
     70    }
     71
    6072    public static function doDbDelta() {
    6173        global  $wpdb;
  • platycorp-etsy-syncer/trunk/includes/syncers/item-syncers/inventory/stock/class-etsy-product-stock-syncer.php

    r2842659 r3095999  
    8787        $decrease_by = \max($decrease_by, 0);
    8888        wc_update_product_stock($etsy_product->get_product(), $decrease_by, 'decrease', true);
    89 
     89    $this->set_stock_status($etsy_product->get_product()->get_id(), $current_stock - $decrease_by);
    9090        $title = $etsy_product->get_product()->get_title();
    9191        $pid = $etsy_product->get_item_id();
    9292        $logger = PlatyLogger::get_instance();
    9393        $logger->log_general("decreased $pid - '$title' quantity by $decrease_by", EtsyProductStockSyncer::LOG_TYPE);
     94    }
     95
     96    private function set_stock_status($product_id, $stock_quantity) {
     97    wc_update_product_stock_status($product_id, $stock_quantity <= 0 ? 'outofstock' : 'instock');
    9498    }
    9599
     
    360364        $product['offerings'][0]['quantity'] = $new_stock;
    361365        $this->etsy_product->get_product()->set_stock_quantity($new_stock);
     366    $this->set_stock_status($this->etsy_product->get_id(), $new_stock);
    362367        return $inventory;
    363368    }
  • platycorp-etsy-syncer/trunk/platy-syncer-etsy.php

    r3071430 r3095999  
    1111 * Plugin URI:        platy-syncer-etsy
    1212 * Description:       Syncs between Woocommerce and Etsy.
    13  * Version:           6.2.9
     13 * Version:           6.3.0
    1414 * Author:            PlatyCorp
    1515 * Author URI:        platycorp.com
     
    2020 *
    2121 * WC requires at least: 4.0.0
    22  * WC tested up to:  8.6
     22 * WC tested up to:  8.8
    2323 */
    2424
     
    3333 * Rename this for your plugin and update it as you release new versions.
    3434 */
    35 define( 'PLATY_SYNCER_ETSY_VERSION', '6.2.9' );
     35define( 'PLATY_SYNCER_ETSY_VERSION', '6.3.0' );
    3636define( 'PLATY_SYNCER_ETSY_DIR_URL', plugin_dir_url(__FILE__) );
    3737define( 'PLATY_SYNCER_ETSY_DIR_PATH', plugin_dir_path(__FILE__) );
     
    7373}
    7474
    75 add_action( 'plugins_loaded', 'update_platy_syncer_etsy' );
     75add_action( 'plugins_loaded', 'update_platy_syncer_etsy', 10);
    7676add_action( 'platy_etsy_clean_logs', 'platy\\etsy\\logs\\PlatyLogger::clean_logs' );
    7777
     
    8787function run_platy_syncer_etsy() {
    8888
     89    if ( ! defined( 'WC_VERSION' ) ) {
     90        add_action( 'admin_notices', function(){
     91            $class = 'notice notice-error';
     92            $message = __( 'Woocommerce is required to use Platy Syncer Etsy', 'sample-text-domain' ); 
     93            printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
     94        } );
     95        return;
     96    }
     97
    8998    $plugin = new Platy_Syncer_Etsy();
    9099    $plugin->run();
     
    99108} );
    100109
    101 run_platy_syncer_etsy();
     110add_action('plugins_loaded', 'run_platy_syncer_etsy', 11);
Note: See TracChangeset for help on using the changeset viewer.