Plugin Directory

Changeset 3166365


Ignore:
Timestamp:
10/10/2024 09:12:23 AM (18 months ago)
Author:
api2cartdev
Message:

Updated to 3.0.2

Location:
api2cart-bridge-connector/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • api2cart-bridge-connector/trunk/api2cart-bridge-connector.php

    r3166349 r3166365  
    55Author: API2Cart
    66Author URI: https://api2cart.com/
    7 Version: 3.0.1
     7Version: 3.0.2
    88*/
    99
  • api2cart-bridge-connector/trunk/bridge2cart/bridge.php

    r3166349 r3166365  
    13141314        } catch ( Exception $e ) {
    13151315            return $reportError( $e );
     1316        } catch ( Throwable $e ) {
     1317            return $reportError( $e );
     1318        }
     1319
     1320        return $response;
     1321    }
     1322
     1323    /**
     1324     * @inheritDoc
     1325     * @return array
     1326     */
     1327    public function getWdrPrice( array $a2cData )
     1328    {
     1329        $response = [
     1330            'error_code' => self::ERROR_CODE_SUCCESS,
     1331            'error'      => null,
     1332            'result'     => array(),
     1333        ];
     1334
     1335        $reportError = function ( $e ) use ( $response ) {
     1336            $response['error'] = $e->getMessage();
     1337            $response['error_code'] = self::ERROR_CODE_INTERNAL_ERROR;
     1338
     1339            return $response;
     1340        };
     1341
     1342        try {
     1343            if ( function_exists( 'switch_to_blog' ) ) {
     1344                switch_to_blog( $a2cData['store_id'] );
     1345            }
     1346
     1347            $class = new Wdr\App\Controllers\ManageDiscount();
     1348
     1349            foreach ( $a2cData['args'] as $args ) {
     1350                $response['result'][$args[0]][$args[1]] = $class::calculateInitialAndDiscountedPrice( $args[0], $args[1] );
     1351            }
     1352        } catch ( Exception $e ) {
     1353            return $reportError($e);
    13161354        } catch ( Throwable $e ) {
    13171355            return $reportError( $e );
  • api2cart-bridge-connector/trunk/readme.txt

    r3166349 r3166365  
    8686= 2.5.2 =* Fix bug
    8787= 2.5.3 =* Fix bug
    88 = 2.5.4 =*'Updated bridge to 156 version. The code was refactored to meet WordPress requirements'
    89 = 3.0.0 =*'Updated bridge to 166 version.'
    90 = 3.0.1 =*'Updated bridge to 167 version.'
     88= 2.5.4 =* Updated bridge to 156 version. The code was refactored to meet WordPress requirements
     89= 3.0.0 =* Updated bridge to 166 version.
     90= 3.0.1 =* Updated bridge to 167 version.
     91= 3.0.2 =* Added support for the "Discount Rules for WooCommerce" plugin.
Note: See TracChangeset for help on using the changeset viewer.