Skip to content

Commit

Permalink
Merge pull request #5 from LinkNacional/dev
Browse files Browse the repository at this point in the history
7.3.6 Update obscurity for products
  • Loading branch information
emanuellopess authored May 3, 2024
2 parents 2022245 + 2eea108 commit dbed296
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: "7.3.5"
custom_tag: "7.3.6"

# Generate new release
- name: Generate new Release
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [7.3.6] - 2024-05-03
### Changed:
- Add obscurity for product fields.

## [7.3.5] - 2024-04-17
### Fixed:
- Checked field on checkout now validated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public function get_items_build_array() {
foreach ( $this->order->get_items() as $item ) {
if ( $item['qty'] ) {
$product = wc_get_product( $item['product_id'] );
// TODO Maybe add option to activate or deactivate anonymous products
// TODO Here is product name for transaction
$product_title = "Product";
$product_content = "";
$product_image = plugins_url( '../../assets/images/cart.png', plugin_dir_path( __FILE__ ) );
Expand Down
2 changes: 1 addition & 1 deletion lkn-wc-mercadopago.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: Mercado Pago by Link Nacional
* Plugin URI: https://github.com/mercadopago/cart-woocommerce
* Description: Configure as opções de pagamento e aceite pagamentos com cartões, boleto e dinheiro da conta Mercado Pago.
* Version: 7.3.5
* Version: 7.3.6
* Author: Mercado Pago
* Author URI: https://developers.mercadopago.com/
* Text Domain: lkn-woocommerce-mercadopago
Expand Down
10 changes: 5 additions & 5 deletions src/Transactions/AbstractTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ public function setItemsTransaction($items): void
$product = $item->get_product();
$quantity = $item->get_quantity();

$title = $product->get_name();
// TODO Here is product name for transaction
$title = 'Product';
$title = "$title x $quantity";

$amount = $this->getItemAmount($item);
Expand All @@ -289,7 +290,7 @@ public function setItemsTransaction($items): void
$item = [
'id' => $item->get_product_id(),
'title' => $title,
'description' => $this->mercadopago->helpers->strings->sanitizeAndTruncateText($product->get_description()),
'description' => 'Common product for sale', // TODO description of product is hidden too $this->mercadopago->helpers->strings->sanitizeAndTruncateText($product->get_description()),
'picture_url' => $this->getItemImage($product),
'category_id' => $this->mercadopago->storeConfig->getStoreCategory('others'),
'unit_price' => $amount,
Expand Down Expand Up @@ -387,9 +388,8 @@ public function getItemAmount(\WC_Order_Item $item): float
*/
public function getItemImage($product): string
{
return is_object($product) && method_exists($product, 'get_image_id')
? wp_get_attachment_url($product->get_image_id())
: $this->mercadopago->helpers->url->getPluginFileUrl('assets/images/gateways/all/blue-cart', '.png', true);
// TODO hide image from product
return $this->mercadopago->helpers->url->getPluginFileUrl('assets/images/gateways/all/blue-cart', '.png', true);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/WoocommerceMercadoPago.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class WoocommerceMercadoPago
/**
* @const
*/
private const PLUGIN_VERSION = '7.3.5';
private const PLUGIN_VERSION = '7.3.6';

/**
* @const
Expand Down

0 comments on commit dbed296

Please sign in to comment.