Skip to content

Commit

Permalink
v3.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pablo-sg-pacheco committed Sep 27, 2024
1 parent 4f5d14e commit c4f07a0
Show file tree
Hide file tree
Showing 40 changed files with 2,917 additions and 441 deletions.
12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@
{
"type": "vcs",
"url": "https://github.com/wpcodefactory/wpfactory-promoting-notice"
},
{
"type": "vcs",
"url": "https://github.com/wpcodefactory/wpfactory-cross-selling"
},
{
"type": "vcs",
"url": "https://github.com/wpcodefactory/wpfactory-admin-menu"
}
],
"require": {
"wpfactory/wpfactory-promoting-notice": "*"
"wpfactory/wpfactory-promoting-notice": "*",
"wpfactory/wpfactory-cross-selling": "*",
"wpfactory/wpfactory-admin-menu": "*"
},
"config": {
"preferred-install": "dist"
Expand Down
115 changes: 107 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cost-of-goods-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Cost of Goods for WooCommerce
Plugin URI: https://wpfactory.com/item/cost-of-goods-for-woocommerce/
Description: Save product purchase costs (cost of goods) in WooCommerce. Beautifully.
Version: 3.5.0
Version: 3.5.1
Author: WPFactory
Author URI: https://wpfactory.com
Text Domain: cost-of-goods-for-woocommerce
Expand Down
50 changes: 47 additions & 3 deletions includes/class-alg-wc-cog.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Cost of Goods for WooCommerce - Costs input.
*
* @version 3.4.5
* @version 3.5.1
* @since 3.0.3
* @author WPFactory
*/
Expand Down Expand Up @@ -35,7 +35,7 @@ final class Alg_WC_Cost_of_Goods {
* @since 1.0.0
* @var string
*/
public $version = '3.4.9';
public $version = '3.5.1';

/**
* @since 1.0.0
Expand Down Expand Up @@ -87,10 +87,16 @@ public static function instance() {
/**
* Initializes.
*
* @version 3.0.3
* @version 3.5.1
* @since 2.8.1
*/
function init() {
// Adds cross-selling library.
$this->add_cross_selling_library();

// Move WC Settings tab to WPFactory menu.
$this->move_wc_settings_tab_to_wpfactory_menu();

// Localization
add_action( 'init', array( $this, 'localize' ) );

Expand Down Expand Up @@ -122,6 +128,44 @@ function init() {
), 10 );
}

/**
* add_cross_selling_library.
*
* @version 3.5.1
* @since 3.5.1
*
* @return void
*/
function add_cross_selling_library(){
if ( ! is_admin() ) {
return;
}
// Cross-selling library.
$cross_selling = new \WPFactory\WPFactory_Cross_Selling\WPFactory_Cross_Selling();
$cross_selling->setup( array( 'plugin_file_path' => $this->get_filesystem_path() ) );
$cross_selling->init();
}

/**
* move_wc_settings_tab_to_wpfactory_submenu.
*
* @version 3.5.1
* @since 3.5.1
*
* @return void
*/
function move_wc_settings_tab_to_wpfactory_menu() {
if ( ! is_admin() ) {
return;
}
// WC Settings tab as WPFactory submenu item.
$wpf_admin_menu = \WPFactory\WPFactory_Admin_Menu\WPFactory_Admin_Menu::get_instance();
$wpf_admin_menu->move_wc_settings_tab_to_wpfactory_menu( array(
'wc_settings_tab_id' => 'alg_wc_cost_of_goods',
'menu_title' => __( 'Cost of Goods', 'cost-of-goods-for-woocommerce' ),
) );
}

/**
* Declare compatibility with custom order tables for WooCommerce.
*
Expand Down
19 changes: 10 additions & 9 deletions langs/cost-of-goods-for-woocommerce-de_DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ msgstr "WPFactory"
msgid "https://wpfactory.com"
msgstr "https://wpfactory.com"

#: includes/class-alg-wc-cog.php:220
#: includes/class-alg-wc-cog.php:264
msgid "Go Pro"
msgstr "Gehen Sie zum Profi"

Expand Down Expand Up @@ -137,6 +137,7 @@ msgstr "Nicht verfügbar"

#: includes/class-alg-wc-cog-orders-meta-boxes.php:116
#: includes/class-alg-wc-cog-orders-meta-boxes.php:219
#: includes/class-alg-wc-cog.php:165
#: includes/pro/class-alg-wc-cog-pro-quick-and-bulk-edit.php:103
#: includes/settings/class-alg-wc-cog-settings-orders.php:430
#: includes/settings/class-alg-wc-cog-settings-products.php:253
Expand Down Expand Up @@ -226,8 +227,8 @@ msgstr "Sie verkaufen unter den Warenkosten."

#: includes/class-alg-wc-cog-orders.php:754
#: includes/class-alg-wc-cog-orders.php:1198
#: includes/pro/class-alg-wc-cog-pro.php:644
#: includes/pro/class-alg-wc-cog-pro.php:663
#: includes/pro/class-alg-wc-cog-pro.php:646
#: includes/pro/class-alg-wc-cog-pro.php:665
msgid "Cost of goods"
msgstr "Warenkosten"

Expand Down Expand Up @@ -329,27 +330,27 @@ msgstr "Kosten der Option(en)."
msgid "- No change -"
msgstr "- Keine Änderung -"

#: includes/pro/class-alg-wc-cog-pro.php:589
#: includes/pro/class-alg-wc-cog-pro.php:591
msgid "Orders cost and profit successfully recalculated."
msgstr "Auftragskosten und Gewinn erfolgreich neu berechnet."

#: includes/pro/class-alg-wc-cog-pro.php:596
#: includes/pro/class-alg-wc-cog-pro.php:598
msgid "Orders cost and profit recalculating via background processing. You should receive an e-mail when it's complete if the \"Advanced > Background processing > Send email\" option is enabled."
msgstr "Neuberechnung der Auftragskosten und -gewinne über die Hintergrundverarbeitung. Wenn die Option \"Erweitert > Hintergrundverarbeitung > E-Mail senden\" aktiviert ist, sollten Sie nach Abschluss eine E-Mail erhalten."

#: includes/pro/class-alg-wc-cog-pro.php:599
#: includes/pro/class-alg-wc-cog-pro.php:601
msgid "Something went wrong..."
msgstr "Etwas ist schief gelaufen..."

#: includes/pro/class-alg-wc-cog-pro.php:717
#: includes/pro/class-alg-wc-cog-pro.php:719
msgid "Cost of Goods reports are in %s and in %s."
msgstr "Warenkostenberichte sind in %s und in %s."

#: includes/pro/class-alg-wc-cog-pro.php:719
#: includes/pro/class-alg-wc-cog-pro.php:721
msgid "Reports > Orders > Cost of Goods"
msgstr "Berichte > Bestellungen > Warenkosten"

#: includes/pro/class-alg-wc-cog-pro.php:721
#: includes/pro/class-alg-wc-cog-pro.php:723
msgid "Reports > Stock > Cost of Goods"
msgstr "Berichte > Lager > Warenkosten"

Expand Down
19 changes: 10 additions & 9 deletions langs/cost-of-goods-for-woocommerce-tr_TR.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ msgstr ""
"X-Generator: Poedit 2.1.1\n"
"X-Loco-Version: 2.4.3; wp-5.5.1\n"

#: includes/class-alg-wc-cog.php:220
#: includes/class-alg-wc-cog.php:264
msgid "Go Pro"
msgstr "Pro Sürüm Satın Al"

Expand All @@ -25,6 +25,7 @@ msgstr "Malların maliyetinin altında satış yapıyorsunuz."

#: includes/class-alg-wc-cog-orders-meta-boxes.php:116
#: includes/class-alg-wc-cog-orders-meta-boxes.php:219
#: includes/class-alg-wc-cog.php:165
#: includes/pro/class-alg-wc-cog-pro-quick-and-bulk-edit.php:103
#: includes/settings/class-alg-wc-cog-settings-orders.php:430
#: includes/settings/class-alg-wc-cog-settings-products.php:253
Expand Down Expand Up @@ -147,8 +148,8 @@ msgstr "ücret"

#: includes/class-alg-wc-cog-orders.php:754
#: includes/class-alg-wc-cog-orders.php:1198
#: includes/pro/class-alg-wc-cog-pro.php:644
#: includes/pro/class-alg-wc-cog-pro.php:663
#: includes/pro/class-alg-wc-cog-pro.php:646
#: includes/pro/class-alg-wc-cog-pro.php:665
msgid "Cost of goods"
msgstr "Malların maliyeti"

Expand Down Expand Up @@ -211,24 +212,24 @@ msgstr "Yok"
msgid "- No change -"
msgstr "- Değişiklik yok -"

#: includes/pro/class-alg-wc-cog-pro.php:589
#: includes/pro/class-alg-wc-cog-pro.php:591
msgid "Orders cost and profit successfully recalculated."
msgstr "Sipariş maliyeti ve karı başarıyla yeniden hesaplandı."

#: includes/pro/class-alg-wc-cog-pro.php:599
#: includes/pro/class-alg-wc-cog-pro.php:601
msgid "Something went wrong..."
msgstr "Bir şeyler yanlış gitti..."

#: includes/pro/class-alg-wc-cog-pro.php:717
#: includes/pro/class-alg-wc-cog-pro.php:719
#, php-format
msgid "Cost of Goods reports are in %s and in %s."
msgstr "Mal Maliyeti raporları %s ve %s cinsindendir."

#: includes/pro/class-alg-wc-cog-pro.php:719
#: includes/pro/class-alg-wc-cog-pro.php:721
msgid "Reports > Orders > Cost of Goods"
msgstr "Raporlar> Siparişler> Malların Maliyeti"

#: includes/pro/class-alg-wc-cog-pro.php:721
#: includes/pro/class-alg-wc-cog-pro.php:723
msgid "Reports > Stock > Cost of Goods"
msgstr "Raporlar> Stok> Mal Maliyeti"

Expand Down Expand Up @@ -1275,7 +1276,7 @@ msgstr ""
msgid "Currencies costs"
msgstr ""

#: includes/pro/class-alg-wc-cog-pro.php:596
#: includes/pro/class-alg-wc-cog-pro.php:598
msgid "Orders cost and profit recalculating via background processing. You should receive an e-mail when it's complete if the \"Advanced > Background processing > Send email\" option is enabled."
msgstr ""

Expand Down
Loading

0 comments on commit c4f07a0

Please sign in to comment.