Global-e Cross-Border Integration For WooCommerce Wordpress Plugin - Rating, Reviews, Demo & Download

Global-e Cross-Border Integration For WooCommerce Wordpress Plugin - Rating, Reviews, Demo & Download
No ratings yet
Free
Follow for free plugins, new theme releases and theme news

Plugin Description

Features And Capabilities

With our application installed and your Global-e Merchant account set up, your store will enjoy the following features and capabilities.
*Shopper’s geolocation: When the shopper accesses the store, the Global‑e application detects the shopper’s location (IP address) and uses that location to predefine the relevant country/currency settings.
*Browsing and buying in local currencies: Shoppers can browse and buy in their local currency; Global‑e supports 100+ currencies. Shoppers can use the shipping switcher to change the order delivery to a different destination or currency.
*Localised pricing by Global‑e: Global‑e converts the value of the merchant’s product prices to the shopper’s local currency. This conversion includes current conversion rates, country coefficients, VAT calculation according to distance selling regulations (EU), rounding rules, currency symbols, and uplift/downlift coefficients across products and categories.
*Fixed prices / RRP: Global‑e supports fixed prices on your platform so that you can keep online pricing (webstore) aligned with the local stores, sites, and franchises.
*Local and alternative payment methods: Shoppers can pay with their preferred local payment method; Global‑e supports 150+ payment methods.
*Landed cost – duty and tax calculation: Shoppers can view and prepay all duties and taxes when checking out to prevent unpleasant surprises upon delivery.
*Optimised shipping options: Shoppers can choose from various international shipping methods at competitive rates, all served via a robust Shipping Engine to serve relevant options for any basket scenario and destination.
*Merchant Of Record: Move all international markets payment fraud liability, tax regulation and compliance to Global‑e as the MOR/SOR.
*International Checkout: The International checkout page is powered by Global‑e to serve all the above capabilities, available as a one-page checkout for optimal conversion.
*Localised welcome and checkout: Complete the shopping experience with a localised welcome message and checkout process, available as part of your platform.

Action hooks

Callback functions for the action hook will be called when product gift message is passed to Create Order endpoint

add_action( GlobaleProModelOrder::ACTION_ORDER_HANDLE_PRODUCT_GIFT_MESSAGE, ‘gcbwc_action_callback_handle_product_gift_message’, 10, 2 );

function gcbwc_action_callback_handle_product_gift_message( $gift_message, $order ) {
if ( $gift_message && $order instanceof WC_Order ) {
do_action( ‘woocommerce_thankyou’, $order->get_id() );
}
}

Callback functions for the action hook will be called after order item is added in Create Order endpoint handler

add_action( GlobaleProModelOrder::ACTION_ORDER_ADD_ORDER_ITEM_AFTER, ‘gcbwc_action_callback_add_order_item_after’, 10, 4 );

function gcbwc_action_callback_add_order_item_after( $ge_cart_id, $ge_cart_item_Id, $item_id, $order_id ) {
if ( $ge_cart_id && $ge_cart_item_Id && $item_id ) {
if (empty($_GET[‘hash’]) || $_GET[‘hash’] == ‘{0}’) {
$_GET[‘hash’] = $ge_cart_id;
GlobaleProHelperSession::injectCookieForRestCall(false);
}
static $geCartModel, $geCartItemIdHelper, $qsHelper;
if (null === $geCartModel) {
$geCartModel = new GlobaleProModelCart(true);
$geCartItemIdHelper = new GlobaleProModelCartItemIdHelper();
$customHelper = new Custom_Add_to_Cart_Helper();
}
$cartItems = $geCartModel->getWcCart()->get_cart();
foreach ($cartItems as $currentCartItemKey => $cartItem) {
if ( $ge_cart_item_Id === $geCartItemIdHelper->encode($cartItem[‘product_id’], $cartItem[‘variation_id’], $currentCartItemKey) ) {
$customHelper->add_order_item_meta($item_id, $cartItem, $currentCartItemKey );
}
}
}
}

Callback functions for the action hook will be called after cart is cleared in Create Order endpoint handler

add_action( GlobaleProHelperSession::ACTION_CLEAR_CART_AFTER, ‘gcbwc_action_callback_clear_cart_after’, 10, 3 );

function gcbwc_action_callback_clear_cart_after($originCart, $originSessionCartData, $posts) {
WC()->session->save_data();
$flusher = W3TCDispatcher::component( ‘CacheFlush’ );
$flusher->objectcache_flush();
}

Filter hooks

=Store Code=
To set up store code apply specific filter with your custom callback function
add_filter( GlobaleProGlobalePro::STORE_CODE_FILTER , 'getStoreCode', 2, 0 );

public static function getStoreCode(){
    return 'store_uk'; //where 'store_uk' is your store code
}

Also store code instalnce should be applyed aswell
add_filter( GlobaleProGlobalePro::STORE_CODE_INSTANCE_FILTER , 'getStoreInstance', 2, 0 );

public static function getStoreInstance(){
    return 'store.uk';  //where 'store.uk' is your store code instance
}

=Store Preferred Culture=
To set up preferred culture apply specific filter with your custom callback function
add_filter( GlobaleProGlobalePro::PREFERRED_CULTURE_FILTER , 'PreferredCulture', 2, 0 );

public static function PreferredCulture(){
    return 'En_en'; //where 'En_en' is your preferred culture
}

Callback functions for the filter hook will be called to add cart product meta attributes in Cart Info endpoint handler

add_filter( GlobaleProModelCart::FILTER_CART_PRODUCT_META_ATTRIBUTES, ‘gcbwc_filter_callback_add_cart_product_meta_attributes’, 10, 2 );

function gcbwc_filter_callback_add_cart_product_meta_attributes( $metaAttributes, $cart_item ) {
$attribute = new GlobaleProApiEntityCustomProductAttribute();
$attribute->setAttributeKey( ‘custom_attribute_key’ );
$attribute->setAttributeValue( ‘custom_attribute_value’ );
$metaAttributes[] = $attribute;

return $metaAttributes;

}

Callback functions for the filter hook will be called to add cart product gift message in Cart Info endpoint handler

add_filter( GlobaleProModelCart::FILTER_CART_PRODUCT_GIFT_MESSAGE, ‘gcbwc_filter_callback_add_gift_message’, 10, 2 );

function gcbwc_filter_callback( $gift_message, $cart_item ) {
if ( !empty( $cart_item[‘gift_from’] ) && !empty( $cart_item[‘gift_message’] ) ) {
$gift_message = sprintf( ‘%s: %s’, $cart_item[‘gift_from’], $cart_item[‘gift_message’] );
}

return $gift_message;

}

Callback functions for the filter hook will be called to add extra virtual products in Cart Info endpoint handler

add_filter( GlobaleProModelCart::FILTER_CART_EXTRA_VIRTUAL_PRODUCTS, ‘gcbwc_filter_callback_add_extra_virtual_products’, 10, 2 );

function gcbwc_filter_callback_add_extra_virtual_products( $extraVirtualProducts, $cart_item ) {
$extraVirtualProducts = array();
$extraVirtualProduct = new GlobaleProApiEntityProduct();
// @todo: set appropriate taxonomy identifier as sku
// $extraVirtualProduct->setProductCode();
$extraVirtualProduct->setListPrice( GlobaleProHelperData::formatPriceForGetCart( $optionWithPrice[‘price’] ) );
$extraVirtualProduct->setOriginalListPrice( GlobaleProHelperData::formatPriceForGetCart( $optionWithPrice[‘price’] ) );
$extraVirtualProduct->setSalePrice( GlobaleProHelperData::formatPriceForGetCart( $optionWithPrice[‘price’] ) );
$extraVirtualProduct->setSalePriceBeforeRounding( GlobaleProHelperData::formatPriceForGetCart( $optionWithPrice[‘price’] ) );
$extraVirtualProduct->setOriginalSalePrice( GlobaleProHelperData::formatPriceForGetCart( $optionWithPrice[‘price’] ) );
}

Callback functions for the filter hook will be called to transform sku of product in Cart Info endpoint handler

add_filter( GlobaleProModelCart::FILTER_CART_TRANSFORM_PRODUCT_SKU, ‘gcbwc_filter_callback_cart_transform_product_sku’, 10, 2 );

function gcbwc_filter_callback_cart_transform_product_sku( $sku, $cart_item ) {
// @todo: simple sku ABC to customized sku ABC-14BE-1
return $sku;
}

Callback functions for the filter hook will be called to transform product object in Cart Info endpoint handler

add_filter( GlobaleProModelCart::FILTER_CART_BUILD_PRODUCT_AFTER, ‘gcbwc_filter_callback_build_product_after’, 10, 2 );

function gcbwc_filter_callback_build_product_after($product, $cart_item) {
$images = CustomHelper::get_product_images_by_cart_item($cart_item, ‘full’);
if (is_array($images) && !empty($images)) {
$cover = reset($images);
$product->setImageURL($cover);
}
}

Callback functions for the filter hook will be called to modify discounts in Cart Info endpoint handler

add_filter( GlobaleProModelCart::FILTER_CART_MODIFY_DISCOUNTS, ‘gcbwc_filter_callback_modify_discounts’, 10, 2 );

function gcbwc_filter_callback_modify_discounts( $discountsList, $productsList ) {
$discount = new GlobaleProApiEntityDiscount();
$amount = 1;
$couponName = ‘some_coupon’;
$taxRate = 0;

$discount->setDiscountValue( round( $amount, 2 ) );
$discount->setOriginalDiscountValue( round( $amount, 2 ) );
$discount->setName( sprintf( GlobaleProApiEntityDiscount::DISCOUNT_NAME_FORMAT, $couponName ) );
$discount->setDescription( sprintf( GlobaleProApiEntityDiscount::DISCOUNT_NAME_FORMAT, $couponName ) );
$discount->setCouponCode( $couponName );
$discount->setDiscountType( GlobaleProApiEntityDiscount::DISCOUNT_TYPE_CART );
$discount->setVATRate( $taxRate );
$discount->setLocalVATRate( $taxRate );
$discountsList[] = $discount;

return $discountsList;

}

Callback functions for the filter hook will be called to load product by transformed sku in Create Order endpoint handler

add_filter( GlobaleProModelOrder::FILTER_ORDER_LOAD_PRODUCT_BY_TRANSFORMED_SKU, ‘gcbwc_filter_callback_load_product_by_transformed_sku’, 10, 2 );

function gcbwc_filter_callback_load_product_by_transformed_sku( $wcProduct, $transformedSku ) {
return $wcProduct;
}

Callback functions for the filter hook will be called to add product meta attributes in Create Order API endpoint handler

add_filter( GlobaleProModelOrder::FILTER_ORDER_PRODUCT_META_ATTRIBUTES, ‘gcbwc_filter_callback_product_metadata_attributes’, 10, 2 );

function gcbwc_filter_callback_product_metadata_attributes( $attributeMetadataList, $productAttributes ) {
foreach ( $productAttributes as $productAttribute ) {
if ( ! empty( $productAttribute->AttributeKey ) && ! empty( $productAttribute->AttributeValue ) ) {
$attributeMetadataList[$productAttribute->AttributeKey] = $productAttribute->AttributeValue;
}
}

return $attributeMetadataList;

}

Callback functions for the filter hook will be called to add virtual products metadata in Create Order endpoint handler

add_filter( GlobaleProModelOrder::FILTER_ORDER_EXTRA_VIRTUAL_PRODUCTS_METADATA, ‘gcbwc_filter_callback_extra_virtual_products_to_metadata’, 10, 3 );

function gcbwc_filter_callback_extra_virtual_products_to_metadata( $extraMetaDataList, $product, $itemId ) {
$productChildren = $product->ChildrenExtraVirtualProducts;
foreach ( $productChildren as $child ) {
$extraMetaDataList[$child->Sku] = $child->Name . ‘ ‘ . $child->ListPrice;
}

return $extraMetaDataList;

}

Screenshots

No screenshots provided


Reviews & Comments