Plugin Directory

Changeset 2900323


Ignore:
Timestamp:
04/17/2023 06:21:11 PM (3 years ago)
Author:
ascendedcrow
Message:

Version = 1.0.24 =

Location:
shop-2-api/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • shop-2-api/trunk/includes/Api/Shop2ApiConnect.php

    r2885872 r2900323  
    559559        );
    560560    }
     561
     562    public function start_sync_orders($order_id)
     563    {
     564        return wp_remote_get(
     565            $this->shop_2_api_url . '/woocommerce/start-order-sync/' . $order_id . '/', ['headers' => $this->header]
     566        );
     567    }
    561568}
  • shop-2-api/trunk/includes/Base/EnqueueWC.php

    r2885872 r2900323  
    4949        add_action( 'manage_shop_order_posts_custom_column',  array($this, 'display_custom_metadata_column_value'), 10, 2 );
    5050
    51     }
     51        // Hook into the 'woocommerce_order_status_changed' action
     52        add_action( 'woocommerce_order_status_changed',  array($this,'woocommerce_send_order'), 10, 3 );
     53    }
     54    /**
     55     * Custom function to be executed when order status changes
     56     *
     57     * @param int     $order_id   The order ID
     58     * @param string  $old_status The old order status
     59     * @param string  $new_status The new order status
     60     */
     61    function woocommerce_send_order( $order_id, $old_status, $new_status ) {
     62        // Perform custom actions based on the order status change
     63        $shop_2_api_connection = new Shop2ApiConnect();
     64        $shop_2_api_connection->start_sync_orders($order_id);
     65    }
     66
    5267    // Add Bol Number in Order List
    5368    function add_custom_metadata_column_to_order_list( $columns ) {
  • shop-2-api/trunk/includes/Pages/Admin.php

    r2825412 r2900323  
    9292                    'manage_options', // Capability
    9393                    'shop2api_bol_mapping', // Menu Slug
    94                     array($this, 'wc_to_bol_mapping_page'), // Function
     94                    array($this, 'wc_to_bol_mapping_page') // Function
    9595                );
    9696
     
    101101                    'manage_options', // Capability
    102102                    'shop2api_bol_koopblok_service', // Menu Slug
    103                     array($this, 'bol_koopblok_service'), // Function
     103                    array($this, 'bol_koopblok_service') // Function
    104104                );
    105105
     
    110110                    'manage_options', // Capability
    111111                    'shop2api_bol_order_service', // Menu Slug
    112                     array($this, 'bol_order_service'), // Function
     112                    array($this, 'bol_order_service') // Function
    113113                );
     114
     115                /*add_submenu_page(
     116                    'shop2api_plugin', //Parent Slug
     117                    'Sync Bol Product to WooCommerce', // Page Title
     118                    'Sync Bol Product to WooCommerce', // Menu Title
     119                    'manage_options', // Capability
     120                    'shop2api_bol_to_wc_product', // Menu Slug
     121                    array($this, 'bol_to_wc_product_sync_page') // Function
     122                );*/
    114123
    115124                $hook = add_submenu_page(
     
    154163            require_once SHOP2API_PLUGIN_PATH . 'templates/wc-to-bol-mapping.php';
    155164        }
     165
     166        public function bol_to_wc_product_sync_page()
     167        {
     168            require_once SHOP2API_PLUGIN_PATH . 'templates/bol-to-wc-product-sync.php';
     169        }
    156170
    157171        public function wc_to_bol_reports_detail_page()
  • shop-2-api/trunk/readme.txt

    r2885872 r2900323  
    33Plugin URI: https://wordpress.org/plugins/shop-2-api/
    44Tags: WooCommerce, Bol
    5 Stable Tag: 1.0.23
     5Stable Tag: 1.0.24
    66Requires at least: 5.0
    77Requires PHP: 7.2
    8 Tested up to: 6.1.1
     8Tested up to: 6.2
    99Author: Adriaan Coetzee
    1010Author URI: https://shop2API.com/
     
    1361363) Added WooCommerce Order field to the Order Service Screen (Overwrite the E-Mail received from Bol.com)
    137137
     138= 1.0.24 =
     1391) Fixed a issue on multi-line order stock sync
     140
    138141== Instructions ==
    1391421) After installing Shop2Api, a new menu item will be available in your WordPress installation, you can continue and click on it and enter you token which was mailed to you.
  • shop-2-api/trunk/shop-2-api.php

    r2885872 r2900323  
    55Plugin URI: https://wordpress.org/plugins/shop-2-api/
    66Description: The plugin Shop2Api will sync products between e-Commerce platforms. The current supported e-Commerce platforms are WooCommerce to Bol.com, and we are working on Amazon, Shopify and others.  We added a koopblok service so that you can check if you lower your price can you get koopblok.
    7 Version: 1.0.23
     7Version: 1.0.24
    88Requires at least: 5.0
    99Requires PHP:      7.2
     
    3434define('SHOP2API_PLUGIN_URL', plugin_dir_url( __FILE__ ));
    3535define('SHOP2API_PLUGIN', plugin_basename( __FILE__ ));
    36 define ('VERSION', '1.0.23');
     36define ('VERSION', '1.0.24');
    3737
    3838// Register items in the project.
Note: See TracChangeset for help on using the changeset viewer.