Plugin Directory

Changeset 3277132


Ignore:
Timestamp:
04/19/2025 09:32:26 AM (11 months ago)
Author:
mihdan
Message:

Update to version 0.1.3 from GitHub

Location:
russian-marketplaces-for-woocommerce
Files:
6 added
26 edited
1 copied

Legend:

Unmodified
Added
Removed
  • russian-marketplaces-for-woocommerce/tags/0.1.3/readme.txt

    r3004283 r3277132  
    11=== Russian marketplaces for WooCommerce ===
    2 Contributors: mihdan, donatory
    3 Tags: WooCommerce,Wildberries,Ozon,Yandex Market,Avito,Lamoda,SberMegaMarket,Aliexpress
     2Contributors: mihdan
     3Tags: Wildberries,Ozon,Yandex Market,Avito,SberMegaMarket
    44Donate link: https://www.kobzarev.com/donate/
    5 Requires at least: 5.2
    6 Tested up to: 6.4
     5Requires at least: 6.5
     6Tested up to: 6.8
    77Requires PHP: 7.4
    8 Stable tag: 0.1.2
     8Stable tag: 0.1.3
    99License: GPL-2.0-or-later
     10License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1011
    1112Link your WooCommerce store to Russian marketplaces and sell more. Adds link-buttons in the card to the same product on marketplaces
     
    7778== Changelog ==
    7879
     80= 0.1.3 (19.04.2025) =
     81- Updated to work with WordPress 6.8+
     82
    7983= 0.1.2 (01.12.2023) =
    80 - Updated to work with WordPress 6.4.+
    81 - Updated to work with WordPress 8.3.+
     84- Updated to work with WordPress 6.4+
     85- Updated to work with WordPress 8.3+
    8286
    8387= 0.1.1 (29.09.2023) =
  • russian-marketplaces-for-woocommerce/tags/0.1.3/src/Assets.php

    r2932681 r3277132  
    33 * Подключает ассеты.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 */
    77
  • russian-marketplaces-for-woocommerce/tags/0.1.3/src/Main.php

    r2932681 r3277132  
    33 * Основной файл плагина.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 */
    77
  • russian-marketplaces-for-woocommerce/tags/0.1.3/src/Marketplace.php

    r2972820 r3277132  
    33 * Абстрактный класс маркетплейса.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 */
    77
     
    4646            [
    4747                'wildberries'    => [
    48                     'name'        => __( 'Wildberries', 'wplovers-woo-russian-marketplaces' ),
     48                    'name'        => __( 'Wildberries', 'woo-russian-marketplaces' ),
    4949                    'css'         => [
    5050                        'background-color' => '#CB11AB',
     
    5454                ],
    5555                'ozon'           => [
    56                     'name'        => __( 'Ozon', 'wplovers-woo-russian-marketplaces' ),
     56                    'name'        => __( 'Ozon', 'woo-russian-marketplaces' ),
    5757                    'css'         => [
    5858                        'background-color' => '#005BFF',
     
    6262                ],
    6363                'yandex_market'  => [
    64                     'name'        => __( 'Yandex Market', 'wplovers-woo-russian-marketplaces' ),
     64                    'name'        => __( 'Yandex Market', 'woo-russian-marketplaces' ),
    6565                    'css'         => [
    6666                        'background-color' => '#FFCC00',
     
    7070                ],
    7171                'avito'          => [
    72                     'name'        => __( 'Avito', 'wplovers-woo-russian-marketplaces' ),
     72                    'name'        => __( 'Avito', 'woo-russian-marketplaces' ),
    7373                    'css'         => [
    7474                        'background-color' => '#00AAFF',
     
    7878                ],
    7979                'lamoda'         => [
    80                     'name'        => __( 'Lamoda', 'wplovers-woo-russian-marketplaces' ),
     80                    'name'        => __( 'Lamoda', 'woo-russian-marketplaces' ),
    8181                    'css'         => [
    8282                        'background-color' => '#000000',
     
    8686                ],
    8787                'sbermegamarket' => [
    88                     'name'        => __( 'SberMegaMarket', 'wplovers-woo-russian-marketplaces' ),
     88                    'name'        => __( 'SberMegaMarket', 'woo-russian-marketplaces' ),
    8989                    'css'         => [
    9090                        'background-color' => '#9B38DC',
     
    9494                ],
    9595                'livemaster'     => [
    96                     'name'        => __( 'Ярмарка мастеров', 'wplovers-woo-russian-marketplaces' ),
     96                    'name'        => __( 'Ярмарка мастеров', 'woo-russian-marketplaces' ),
    9797                    'css'         => [
    9898                        'background-color' => '#EA7913',
     
    102102                ],
    103103                'aliexpress'     => [
    104                     'name'        => __( 'Aliexpress', 'wplovers-woo-russian-marketplaces' ),
     104                    'name'        => __( 'Aliexpress', 'woo-russian-marketplaces' ),
    105105                    'css'         => [
    106106                        'background-color' => '#CC290A',
  • russian-marketplaces-for-woocommerce/tags/0.1.3/src/Marketplaces/Wildberries.php

    r2932681 r3277132  
    33 * Класс маркетплейса Wildberries.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 */
    77
     
    2929     */
    3030    public function get_name(): string {
    31         return __( 'Wildberries', 'wplovers-woo-russian-marketplaces' );
     31        return __( 'Wildberries', 'woo-russian-marketplaces' );
    3232    }
    3333
  • russian-marketplaces-for-woocommerce/tags/0.1.3/src/Metabox.php

    r2972820 r3277132  
    33 * Вкладка настроек товара в метабоксе WooCommerce.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 * @link https://woocommerce.com/document/editing-product-data-tabs/
    77 * @link https://misha.agency/course/nastrojki-tovara-woocommerce
     
    8585                    <?php
    8686                    echo wp_kses_post(
    87                         sprintf( __( 'All marketplaces are disabled. Enable at least one in <a href="%s">Settings</a>.', 'wplovers-woo-russian-marketplaces' ), Settings::get_settings_link() )
     87                        /* translators: settings URL */
     88                        sprintf( __( 'All marketplaces are disabled. Enable at least one in <a href="%s">Settings</a>.', 'woo-russian-marketplaces' ), Settings::get_settings_link() )
    8889                    );
    8990                    ?>
    9091                </p>
    9192            <?php else : ?>
    92                 <p><?php esc_html_e( 'Insert links for this product on marketplaces into the fields', 'wplovers-woo-russian-marketplaces' ); ?></p>
     93                <p><?php esc_html_e( 'Insert links for this product on marketplaces into the fields', 'woo-russian-marketplaces' ); ?></p>
    9394            <?php endif; ?>
    9495            <?php
     
    109110            ?>
    110111            <div class="wplovers-gopro">
    111                 <p><b><?php esc_html_e( 'Want to automatically fill in product links?', 'wplovers-woo-russian-marketplaces' ); ?></b> <?php esc_html_e( 'Connect integration with marketplaces and get:', 'wplovers-woo-russian-marketplaces' ); ?></p>
     112                <p><b><?php esc_html_e( 'Want to automatically fill in product links?', 'woo-russian-marketplaces' ); ?></b> <?php esc_html_e( 'Connect integration with marketplaces and get:', 'woo-russian-marketplaces' ); ?></p>
    112113                <ul>
    113                     <li><?php esc_html_e( 'Automatic download and upload products;', 'wplovers-woo-russian-marketplaces' ); ?></li>
    114                     <li><?php esc_html_e( 'Loading orders;', 'wplovers-woo-russian-marketplaces' ); ?></li>
    115                     <li><?php esc_html_e( 'Exchange of balances;', 'wplovers-woo-russian-marketplaces' ); ?></li>
    116                     <li><?php esc_html_e( 'Flexible pricing.', 'wplovers-woo-russian-marketplaces' ); ?></li>
     114                    <li><?php esc_html_e( 'Automatic download and upload products;', 'woo-russian-marketplaces' ); ?></li>
     115                    <li><?php esc_html_e( 'Loading orders;', 'woo-russian-marketplaces' ); ?></li>
     116                    <li><?php esc_html_e( 'Exchange of balances;', 'woo-russian-marketplaces' ); ?></li>
     117                    <li><?php esc_html_e( 'Flexible pricing.', 'woo-russian-marketplaces' ); ?></li>
    117118                </ul>
    118                 <p><a href="<?php echo esc_url( Settings::get_gopro_link() ); ?>"><b><?php esc_html_e( 'Yes, I want to automate everything!', 'wplovers-woo-russian-marketplaces' ); ?></b></a></p>
     119                <p><a href="<?php echo esc_url( Settings::get_gopro_link() ); ?>"><b><?php esc_html_e( 'Yes, I want to automate everything!', 'woo-russian-marketplaces' ); ?></b></a></p>
    119120            </div>
    120121        </div>
  • russian-marketplaces-for-woocommerce/tags/0.1.3/src/Settings.php

    r2932681 r3277132  
    33 * Настройки плагина.
    44 *
    5  * @package wplovers-woo-russian-marketplaces;
     5 * @package woo-russian-marketplaces;
    66 * @link https://woocommerce.com/document/adding-a-section-to-a-settings-tab/
    77 * @link https://www.tychesoftwares.com/how-to-add-custom-sections-fields-in-woocommerce-settings/
     
    2424     * Идентификатор секции.
    2525     */
    26     const SECTION_SLUG = 'wplovers-woo-russian-marketplaces';
     26    const SECTION_SLUG = 'woo-russian-marketplaces';
    2727
    2828    /**
     
    7272
    7373        add_action(
    74             'admin_head',
     74            'admin_enqueue_scripts',
    7575            function () {
    76                 ?>
    77                 <script>
    78                     jQuery( function ( $ ) {
    79                         const
    80                             collapsed_class = 'wplovers-spoiler--collapsed',
    81                             $spoilers       = $( '.wplovers-spoiler' );
    82 
    83                         $( '.wplovers-spoiler__name' ).on(
    84                             'click',
    85                             function () {
    86                                 //$spoilers.addClass( collapsed_class );
    87                                 $( this ).parents( '.wplovers-spoiler' ).toggleClass( collapsed_class );
    88                             }
    89                         );
    90                     } );
    91                 </script>
    92                 <?php
     76                wp_enqueue_script(
     77                    Utils::get_plugin_slug(),
     78                    Utils::get_plugin_url() . 'assets/js/admin.js',
     79                    [ 'jquery' ],
     80                    filemtime( Utils::get_plugin_path() . 'assets/js/admin.js' )
     81                );
    9382            }
    9483        );
     
    133122                '<a href="%s">%s</a>',
    134123                self::get_settings_link(),
    135                 esc_html__( 'Settings', 'wplovers-woo-russian-marketplaces' )
     124                esc_html__( 'Settings', 'woo-russian-marketplaces' )
    136125            );
    137126
     
    139128                '<a href="%s" style="font-weight: bold; color: #524cff">%s</a>',
    140129                self::get_gopro_link(),
    141                 esc_html__( 'Get full integrations!', 'wplovers-woo-russian-marketplaces' )
     130                esc_html__( 'Get full integrations!', 'woo-russian-marketplaces' )
    142131            );
    143132
     
    231220                'text' => sprintf(
    232221                    '<h1>%s</h1>',
    233                     __( 'Russian marketplaces settings', 'wplovers-woo-russian-marketplaces' )
     222                    __( 'Russian marketplaces settings', 'woo-russian-marketplaces' )
    234223                ),
    235224                'id'   => 'info',
     
    239228        $settings_slider[] = $this->add_field(
    240229            [
    241                 'name' => __( 'Buttons block design', 'wplovers-woo-russian-marketplaces' ),
     230                'name' => __( 'Buttons block design', 'woo-russian-marketplaces' ),
    242231                'type' => 'title',
    243                 'desc' => __( 'Settings of the main block with buttons-links to marketplaces', 'wplovers-woo-russian-marketplaces' ),
     232                'desc' => __( 'Settings of the main block with buttons-links to marketplaces', 'woo-russian-marketplaces' ),
    244233                'id'   => 'buttons_block_design',
    245234            ]
     
    248237        $settings_slider[] = $this->add_field(
    249238            [
    250                 'name'        => __( 'Margin top', 'wplovers-woo-russian-marketplaces' ),
     239                'name'        => __( 'Margin top', 'woo-russian-marketplaces' ),
    251240                'type'        => 'number',
    252241                'id'          => 'buttons_block_design_margin_top',
     
    259248        $settings_slider[] = $this->add_field(
    260249            [
    261                 'name'        => __( 'Margin bottom', 'wplovers-woo-russian-marketplaces' ),
     250                'name'        => __( 'Margin bottom', 'woo-russian-marketplaces' ),
    262251                'type'        => 'number',
    263252                'id'          => 'buttons_block_design_margin_bottom',
     
    270259        $settings_slider[] = $this->add_field(
    271260            [
    272                 'name'        => __( 'Padding', 'wplovers-woo-russian-marketplaces' ),
    273                 'desc'        => __( 'Sets padding on all sides of the block', 'wplovers-woo-russian-marketplaces' ),
     261                'name'        => __( 'Padding', 'woo-russian-marketplaces' ),
     262                'desc'        => __( 'Sets padding on all sides of the block', 'woo-russian-marketplaces' ),
    274263                'type'        => 'number',
    275264                'id'          => 'buttons_block_design_padding',
     
    282271        $settings_slider[] = $this->add_field(
    283272            [
    284                 'name'        => __( 'Background color', 'wplovers-woo-russian-marketplaces' ),
     273                'name'        => __( 'Background color', 'woo-russian-marketplaces' ),
    285274                'type'        => 'color',
    286275                'id'          => 'buttons_block_design_background_color',
     
    293282        $settings_slider[] = $this->add_field(
    294283            [
    295                 'name'        => __( 'Border width', 'wplovers-woo-russian-marketplaces' ),
     284                'name'        => __( 'Border width', 'woo-russian-marketplaces' ),
    296285                'type'        => 'number',
    297286                'id'          => 'buttons_block_design_border_width',
     
    304293        $settings_slider[] = $this->add_field(
    305294            [
    306                 'name'        => __( 'Border radius', 'wplovers-woo-russian-marketplaces' ),
     295                'name'        => __( 'Border radius', 'woo-russian-marketplaces' ),
    307296                'type'        => 'number',
    308297                'id'          => 'buttons_block_design_border_radius',
     
    315304        $settings_slider[] = $this->add_field(
    316305            [
    317                 'name'        => __( 'Border color', 'wplovers-woo-russian-marketplaces' ),
     306                'name'        => __( 'Border color', 'woo-russian-marketplaces' ),
    318307                'type'        => 'color',
    319308                'id'          => 'buttons_block_design_border_color',
     
    326315        $settings_slider[] = $this->add_field(
    327316            [
    328                 'name'    => __( 'Where to place', 'wplovers-woo-russian-marketplaces' ),
     317                'name'    => __( 'Where to place', 'woo-russian-marketplaces' ),
    329318                'type'    => 'radio',
    330319                'id'      => 'buttons_block_design_where_to_place',
    331320                'options' => [
    332                     'before' => __( 'Before Add to cart block', 'wplovers-woo-russian-marketplaces' ),
    333                     'after'  => __( 'After Add to cart block', 'wplovers-woo-russian-marketplaces' ),
     321                    'before' => __( 'Before Add to cart block', 'woo-russian-marketplaces' ),
     322                    'after'  => __( 'After Add to cart block', 'woo-russian-marketplaces' ),
    334323                ],
    335324                'default' => 'after',
     
    346335        $settings_slider[] = $this->add_field(
    347336            [
    348                 'name' => __( 'Block title', 'wplovers-woo-russian-marketplaces' ),
     337                'name' => __( 'Block title', 'woo-russian-marketplaces' ),
    349338                'type' => 'title',
    350                 'desc' => __( 'Write your call to buy on marketplaces', 'wplovers-woo-russian-marketplaces' ),
     339                'desc' => __( 'Write your call to buy on marketplaces', 'woo-russian-marketplaces' ),
    351340                'id'   => 'block_title',
    352341            ]
     
    355344        $settings_slider[] = $this->add_field(
    356345            [
    357                 'name'    => __( 'Text', 'wplovers-woo-russian-marketplaces' ),
     346                'name'    => __( 'Text', 'woo-russian-marketplaces' ),
    358347                'type'    => 'text',
    359348                'id'      => 'block_title_text',
    360                 'default' => __( 'Buy this product on marketplaces', 'wplovers-woo-russian-marketplaces' ),
     349                'default' => __( 'Buy this product on marketplaces', 'woo-russian-marketplaces' ),
    361350                'css'     => 'width:260px',
    362351            ]
     
    365354        $settings_slider[] = $this->add_field(
    366355            [
    367                 'name'        => __( 'Margin bottom', 'wplovers-woo-russian-marketplaces' ),
     356                'name'        => __( 'Margin bottom', 'woo-russian-marketplaces' ),
    368357                'type'        => 'number',
    369358                'id'          => 'block_title_margin_bottom',
     
    376365        $settings_slider[] = $this->add_field(
    377366            [
    378                 'name'        => __( 'Font size', 'wplovers-woo-russian-marketplaces' ),
     367                'name'        => __( 'Font size', 'woo-russian-marketplaces' ),
    379368                'type'        => 'number',
    380369                'id'          => 'block_title_font_size',
     
    387376        $settings_slider[] = $this->add_field(
    388377            [
    389                 'name'        => __( 'Color', 'wplovers-woo-russian-marketplaces' ),
     378                'name'        => __( 'Color', 'woo-russian-marketplaces' ),
    390379                'type'        => 'color',
    391380                'id'          => 'block_title_color',
     
    408397        $settings_slider[] = $this->add_field(
    409398            [
    410                 'name' => __( 'Marketplaces', 'wplovers-woo-russian-marketplaces' ),
     399                'name' => __( 'Marketplaces', 'woo-russian-marketplaces' ),
    411400                'type' => 'title',
    412401                'id'   => 'marketplaces',
     
    416405        $settings_slider[] = $this->add_field(
    417406            [
    418                 'name'        => __( 'Buttons border width', 'wplovers-woo-russian-marketplaces' ),
     407                'name'        => __( 'Buttons border width', 'woo-russian-marketplaces' ),
    419408                'type'        => 'number',
    420409                'id'          => 'button_border_width',
     
    427416        $settings_slider[] = $this->add_field(
    428417            [
    429                 'name'        => __( 'Buttons border radius', 'wplovers-woo-russian-marketplaces' ),
     418                'name'        => __( 'Buttons border radius', 'woo-russian-marketplaces' ),
    430419                'type'        => 'number',
    431420                'id'          => 'button_border_radius',
     
    438427        $settings_slider[] = $this->add_field(
    439428            [
    440                 'name'        => __( 'Buttons font size', 'wplovers-woo-russian-marketplaces' ),
     429                'name'        => __( 'Buttons font size', 'woo-russian-marketplaces' ),
    441430                'type'        => 'number',
    442431                'id'          => 'button_font_size',
     
    479468            $settings_slider[] = $this->add_field(
    480469                [
    481                     'name'    => __( 'On/Off', 'wplovers-woo-russian-marketplaces' ),
     470                    'name'    => __( 'On/Off', 'woo-russian-marketplaces' ),
    482471                    'type'    => 'checkbox',
    483472                    'default' => 'no',
     
    488477            $settings_slider[] = $this->add_field(
    489478                [
    490                     'name'        => __( 'Button background color', 'wplovers-woo-russian-marketplaces' ),
     479                    'name'        => __( 'Button background color', 'woo-russian-marketplaces' ),
    491480                    'type'        => 'color',
    492481                    'default'     => $data['css']['background-color'],
     
    499488            $settings_slider[] = $this->add_field(
    500489                [
    501                     'name'        => __( 'Button border color', 'wplovers-woo-russian-marketplaces' ),
     490                    'name'        => __( 'Button border color', 'woo-russian-marketplaces' ),
    502491                    'type'        => 'color',
    503492                    'id'          => 'marketplaces_' . $marketplace_id . '_border_color',
     
    510499            $settings_slider[] = $this->add_field(
    511500                [
    512                     'name'        => __( 'Marketplace name color', 'wplovers-woo-russian-marketplaces' ),
     501                    'name'        => __( 'Marketplace name color', 'woo-russian-marketplaces' ),
    513502                    'type'        => 'color',
    514503                    'id'          => 'marketplaces_' . $marketplace_id . '_color',
     
    521510            $settings_slider[] = $this->add_field(
    522511                [
    523                     'name' => __( 'Go Pro', 'wplovers-woo-russian-marketplaces' ),
     512                    'name' => __( 'Go Pro', 'woo-russian-marketplaces' ),
    524513                    'type' => 'html',
    525514                    'id'   => 'marketplaces_' . $marketplace_id . '_gopro',
     
    545534        $settings_slider[] = $this->add_field(
    546535            [
    547                 'name' => __( 'SEO', 'wplovers-woo-russian-marketplaces' ),
     536                'name' => __( 'SEO', 'woo-russian-marketplaces' ),
    548537                'type' => 'title',
    549538                'id'   => 'seo',
     
    553542        $settings_slider[] = $this->add_field(
    554543            [
    555                 'name'    => __( 'Wrap links with noindex', 'wplovers-woo-russian-marketplaces' ),
     544                'name'    => __( 'Wrap links with noindex', 'woo-russian-marketplaces' ),
    556545                'type'    => 'checkbox',
    557546                'default' => 'no',
     
    562551        $settings_slider[] = $this->add_field(
    563552            [
    564                 'name'    => __( 'Add nofollow attribute to links', 'wplovers-woo-russian-marketplaces' ),
     553                'name'    => __( 'Add nofollow attribute to links', 'woo-russian-marketplaces' ),
    565554                'type'    => 'checkbox',
    566555                'default' => 'no',
     
    571560        $settings_slider[] = $this->add_field(
    572561            [
    573                 'name'    => __( 'Open links in a new tab', 'wplovers-woo-russian-marketplaces' ),
     562                'name'    => __( 'Open links in a new tab', 'woo-russian-marketplaces' ),
    574563                'type'    => 'checkbox',
    575564                'default' => 'no',
     
    640629        ?>
    641630        <div class="wplovers-gopro">
    642             <p><b><?php esc_html_e( 'Want to automatically fill in product links?', 'wplovers-woo-russian-marketplaces' ); ?></b> <?php esc_html_e( 'Connect integration with marketplaces and get:', 'wplovers-woo-russian-marketplaces' ); ?></p>
     631            <p><b><?php esc_html_e( 'Want to automatically fill in product links?', 'woo-russian-marketplaces' ); ?></b> <?php esc_html_e( 'Connect integration with marketplaces and get:', 'woo-russian-marketplaces' ); ?></p>
    643632            <ul>
    644                 <li><?php esc_html_e( 'Automatic download and upload products;', 'wplovers-woo-russian-marketplaces' ); ?></li>
    645                 <li><?php esc_html_e( 'Loading orders;', 'wplovers-woo-russian-marketplaces' ); ?></li>
    646                 <li><?php esc_html_e( 'Exchange of balances;', 'wplovers-woo-russian-marketplaces' ); ?></li>
    647                 <li><?php esc_html_e( 'Flexible pricing.', 'wplovers-woo-russian-marketplaces' ); ?></li>
     633                <li><?php esc_html_e( 'Automatic download and upload products;', 'woo-russian-marketplaces' ); ?></li>
     634                <li><?php esc_html_e( 'Loading orders;', 'woo-russian-marketplaces' ); ?></li>
     635                <li><?php esc_html_e( 'Exchange of balances;', 'woo-russian-marketplaces' ); ?></li>
     636                <li><?php esc_html_e( 'Flexible pricing.', 'woo-russian-marketplaces' ); ?></li>
    648637            </ul>
    649             <p><a href="<?php echo esc_url( self::get_gopro_link() ); ?>"><b><?php esc_html_e( 'Yes, I want to automate everything!', 'wplovers-woo-russian-marketplaces' ); ?></b></a></p>
     638            <p><a href="<?php echo esc_url( self::get_gopro_link() ); ?>"><b><?php esc_html_e( 'Yes, I want to automate everything!', 'woo-russian-marketplaces' ); ?></b></a></p>
    650639        </div>
    651640        <?php
  • russian-marketplaces-for-woocommerce/tags/0.1.3/src/Utils.php

    r2932681 r3277132  
    33 * Полезные утилиты для плагина.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 */
    77
  • russian-marketplaces-for-woocommerce/tags/0.1.3/src/Widget.php

    r2932681 r3277132  
    33 * Вывод виджета во фронтенде.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 */
    77
     
    2323            add_action( 'woocommerce_before_add_to_cart_form', [ $this, 'add_block' ] );
    2424        }
     25
     26        add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_scripts' ], 11 );
     27    }
     28
     29    public function enqueue_scripts(): void {
     30        $urls         = get_post_meta( get_the_ID(), Utils::get_plugin_prefix(), true );
     31        $marketplaces = Marketplace::get_merketplaces();
     32        $settings     = Settings::get_options();
     33        ob_start();
     34        ?>
     35        .woo-russian-marketplaces {
     36            background-color: <?php echo esc_html( $settings['buttons_block_design_background_color'] ); ?>;
     37            padding: <?php echo esc_html( $settings['buttons_block_design_padding'] ); ?>px;
     38            border-radius: <?php echo esc_html( $settings['buttons_block_design_border_radius'] ); ?>px;
     39            margin-top: <?php echo esc_html( $settings['buttons_block_design_margin_top'] ); ?>px;
     40            margin-bottom: <?php echo esc_html( $settings['buttons_block_design_margin_bottom'] ); ?>px;
     41            border-width: <?php echo esc_html( $settings['buttons_block_design_border_width'] ); ?>px;
     42            border-style: solid;
     43            border-color: <?php echo esc_html( $settings['buttons_block_design_border_color'] ); ?>;
     44        }
     45        .woo-russian-marketplaces .woo-russian-marketplaces__header {
     46            font-weight: 700;
     47            margin-bottom: <?php echo esc_html( $settings['block_title_margin_bottom'] ); ?>px;
     48            font-size: <?php echo esc_html( $settings['block_title_font_size'] ); ?>px;
     49            color: <?php echo esc_html( $settings['block_title_color'] ); ?>;
     50        }
     51        .woo-russian-marketplaces .woo-russian-marketplaces__list {
     52            display: flex;
     53            flex-direction: row;
     54            flex-wrap: wrap;
     55            gap: 15px;
     56            align-items: center;
     57            justify-content: flex-start;
     58        }
     59        .woo-russian-marketplaces .woo-russian-marketplaces__link {
     60            text-decoration: none;
     61            text-transform: uppercase;
     62            padding: 8px 22px;
     63            -webkit-transition: all 300ms ease;
     64            transition: all 300ms ease;
     65            border-style: solid;
     66            border-width: <?php echo esc_html( $settings['button_border_width'] ); ?>px;
     67            font-size: <?php echo esc_html( $settings['button_font_size'] ); ?>px;
     68            border-radius: <?php echo esc_html( $settings['button_border_radius'] ); ?>px;
     69        }
     70        .woo-russian-marketplaces .woo-russian-marketplaces__link:hover {
     71            opacity: 0.8;
     72        }
     73        <?php foreach ( $urls as $marketplace => $url ) : ?>
     74            <?php
     75            if ( empty( $url ) ) {
     76                continue;
     77            }
     78            ?>
     79            .woo-russian-marketplaces .woo-russian-marketplaces__link--<?php echo esc_html( $marketplace ); ?> {
     80                background-color: <?php echo esc_html( $settings[ 'marketplaces_' . $marketplace . '_background_color' ] ); ?>;
     81                border-color: <?php echo esc_html( $settings[ 'marketplaces_' . $marketplace . '_border_color' ] ); ?>;
     82                color: <?php echo esc_html( $settings[ 'marketplaces_' . $marketplace . '_color' ] ); ?>;
     83            }
     84        <?php endforeach; ?>
     85        <?php
     86        wp_add_inline_style( 'photoswipe', ob_get_clean() );
    2587    }
    2688
     
    40102                    sprintf(
    41103                    /* translators: plugin name, settings link */
    42                         __( 'Плагин "%1$s" активирован, но не настроен! <a href="%2$s">Настроить плагин.</a>', 'wplovers-woo-russian-marketplaces' ),
     104                        __( 'Плагин "%1$s" активирован, но не настроен! <a href="%2$s">Настроить плагин.</a>', 'woo-russian-marketplaces' ),
    43105                        Utils::get_plugin_name(),
    44106                        Settings::get_settings_link()
     
    91153                </div>
    92154            </div>
    93             <style>
    94                 .wplovers-woo-russian-marketplaces {
    95                     background-color: <?php echo esc_html( $settings['buttons_block_design_background_color'] ); ?>;
    96                     padding: <?php echo esc_html( $settings['buttons_block_design_padding'] ); ?>px;
    97                     border-radius: <?php echo esc_html( $settings['buttons_block_design_border_radius'] ); ?>px;
    98                     margin-top: <?php echo esc_html( $settings['buttons_block_design_margin_top'] ); ?>px;
    99                     margin-bottom: <?php echo esc_html( $settings['buttons_block_design_margin_bottom'] ); ?>px;
    100                     border-width: <?php echo esc_html( $settings['buttons_block_design_border_width'] ); ?>px;
    101                     border-style: solid;
    102                     border-color: <?php echo esc_html( $settings['buttons_block_design_border_color'] ); ?>;
    103                 }
    104                 .wplovers-woo-russian-marketplaces .wplovers-woo-russian-marketplaces__header {
    105                     font-weight: 700;
    106                     margin-bottom: <?php echo esc_html( $settings['block_title_margin_bottom'] ); ?>px;
    107                     font-size: <?php echo esc_html( $settings['block_title_font_size'] ); ?>px;
    108                     color: <?php echo esc_html( $settings['block_title_color'] ); ?>;
    109                 }
    110                 .wplovers-woo-russian-marketplaces .wplovers-woo-russian-marketplaces__list {
    111                     display: flex;
    112                     flex-direction: row;
    113                     flex-wrap: wrap;
    114                     gap: 15px;
    115                     align-items: center;
    116                     justify-content: flex-start;
    117                 }
    118                 .wplovers-woo-russian-marketplaces .wplovers-woo-russian-marketplaces__link {
    119                     text-decoration: none;
    120                     text-transform: uppercase;
    121                     padding: 8px 22px;
    122                     -webkit-transition: all 300ms ease;
    123                     transition: all 300ms ease;
    124                     border-style: solid;
    125                     border-width: <?php echo esc_html( $settings['button_border_width'] ); ?>px;
    126                     font-size: <?php echo esc_html( $settings['button_font_size'] ); ?>px;
    127                     border-radius: <?php echo esc_html( $settings['button_border_radius'] ); ?>px;
    128                 }
    129                 .wplovers-woo-russian-marketplaces .wplovers-woo-russian-marketplaces__link:hover {
    130                     opacity: 0.8;
    131                 }
    132                 <?php foreach ( $urls as $marketplace => $url ) : ?>
    133                     <?php
    134                     if ( empty( $url ) ) {
    135                         continue;
    136                     }
    137                     ?>
    138                     .wplovers-woo-russian-marketplaces .wplovers-woo-russian-marketplaces__link--<?php echo esc_html( $marketplace ); ?> {
    139                         background-color: <?php echo esc_html( $settings[ 'marketplaces_' . $marketplace . '_background_color' ] ); ?>;
    140                         border-color: <?php echo esc_html( $settings[ 'marketplaces_' . $marketplace . '_border_color' ] ); ?>;
    141                         color: <?php echo esc_html( $settings[ 'marketplaces_' . $marketplace . '_color' ] ); ?>;
    142                     }
    143                 <?php endforeach; ?>
    144             </style>
    145155        <?php endif; ?>
    146156        <?php
  • russian-marketplaces-for-woocommerce/tags/0.1.3/vendor/autoload.php

    r3004283 r3277132  
    1515        }
    1616    }
    17     trigger_error(
    18         $err,
    19         E_USER_ERROR
    20     );
     17    throw new RuntimeException($err);
    2118}
    2219
  • russian-marketplaces-for-woocommerce/tags/0.1.3/vendor/composer/InstalledVersions.php

    r2932681 r3277132  
    2828{
    2929    /**
     30     * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
     31     * @internal
     32     */
     33    private static $selfDir = null;
     34
     35    /**
    3036     * @var mixed[]|null
    3137     * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
    3238     */
    3339    private static $installed;
     40
     41    /**
     42     * @var bool
     43     */
     44    private static $installedIsLocalDir;
    3445
    3546    /**
     
    310321        self::$installed = $data;
    311322        self::$installedByVendor = array();
     323
     324        // when using reload, we disable the duplicate protection to ensure that self::$installed data is
     325        // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
     326        // so we have to assume it does not, and that may result in duplicate data being returned when listing
     327        // all installed packages for example
     328        self::$installedIsLocalDir = false;
     329    }
     330
     331    /**
     332     * @return string
     333     */
     334    private static function getSelfDir()
     335    {
     336        if (self::$selfDir === null) {
     337            self::$selfDir = strtr(__DIR__, '\\', '/');
     338        }
     339
     340        return self::$selfDir;
    312341    }
    313342
     
    323352
    324353        $installed = array();
     354        $copiedLocalDir = false;
    325355
    326356        if (self::$canGetVendors) {
     357            $selfDir = self::getSelfDir();
    327358            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
     359                $vendorDir = strtr($vendorDir, '\\', '/');
    328360                if (isset(self::$installedByVendor[$vendorDir])) {
    329361                    $installed[] = self::$installedByVendor[$vendorDir];
     
    331363                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
    332364                    $required = require $vendorDir.'/composer/installed.php';
    333                     $installed[] = self::$installedByVendor[$vendorDir] = $required;
    334                     if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    335                         self::$installed = $installed[count($installed) - 1];
     365                    self::$installedByVendor[$vendorDir] = $required;
     366                    $installed[] = $required;
     367                    if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
     368                        self::$installed = $required;
     369                        self::$installedIsLocalDir = true;
    336370                    }
     371                }
     372                if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
     373                    $copiedLocalDir = true;
    337374                }
    338375            }
     
    351388        }
    352389
    353         if (self::$installed !== array()) {
     390        if (self::$installed !== array() && !$copiedLocalDir) {
    354391            $installed[] = self::$installed;
    355392        }
  • russian-marketplaces-for-woocommerce/tags/0.1.3/vendor/composer/installed.php

    r3004283 r3277132  
    22    'root' => array(
    33        'name' => 'wplovers/woo-russian-marketplace',
    4         'pretty_version' => '0.1.2',
    5         'version' => '0.1.2.0',
    6         'reference' => '18261b156a42845dcb29afb3a51c4cf8e2e58dcb',
     4        'pretty_version' => '0.1.3',
     5        'version' => '0.1.3.0',
     6        'reference' => '038513384485353994c96b39898b927d96fc33d8',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'wplovers/woo-russian-marketplace' => array(
    14             'pretty_version' => '0.1.2',
    15             'version' => '0.1.2.0',
    16             'reference' => '18261b156a42845dcb29afb3a51c4cf8e2e58dcb',
     14            'pretty_version' => '0.1.3',
     15            'version' => '0.1.3.0',
     16            'reference' => '038513384485353994c96b39898b927d96fc33d8',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • russian-marketplaces-for-woocommerce/tags/0.1.3/woo-russian-marketplaces.php

    r3004283 r3277132  
    22/**
    33 * Plugin Name: Russian marketplaces for WooCommerce
     4 * Plugin URI:https://www.kobzarev.com/
    45 * Description: Добавьте ссылки на свои товары в Российских маркетплейсах.
    5  * Author: WPlovers
    6  * Author URI: https://wplovers.pro/
    7  * Version: 0.1.2
     6 * Author: mihdan
     7 * Author URI: https://www.kobzarev.com/
     8 * Version: 0.1.3
     9 * Requires at least: 6.5
     10 * Requires PHP: 7.4
     11 * License: GPLv2 or later
     12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
     13 * Text Domain: woo-russian-marketplaces
     14 * Requires Plugins: woocommerce
    815 *
    9  * @package wplovers-woo-russian-marketplaces
     16 * @package woo-russian-marketplaces
    1017 */
    1118
     
    1320
    1421define( 'WPL_WOO_RUSSIAN_MARKETPLACES_NAME', 'Russian marketplaces for WooCommerce' );
    15 define( 'WPL_WOO_RUSSIAN_MARKETPLACES_SLUG', 'wplovers-woo-russian-marketplaces' );
    16 define( 'WPL_WOO_RUSSIAN_MARKETPLACES_PREFIX', 'wplovers_woo_russian_marketplaces' );
     22define( 'WPL_WOO_RUSSIAN_MARKETPLACES_SLUG', 'woo-russian-marketplaces' );
     23define( 'WPL_WOO_RUSSIAN_MARKETPLACES_PREFIX', 'woo_russian_marketplaces' );
    1724define( 'WPL_WOO_RUSSIAN_MARKETPLACES_BASENAME', plugin_basename( __FILE__ ) );
    1825define( 'WPL_WOO_RUSSIAN_MARKETPLACES_URL', plugin_dir_url( __FILE__ ) );
  • russian-marketplaces-for-woocommerce/trunk/readme.txt

    r3004283 r3277132  
    11=== Russian marketplaces for WooCommerce ===
    2 Contributors: mihdan, donatory
    3 Tags: WooCommerce,Wildberries,Ozon,Yandex Market,Avito,Lamoda,SberMegaMarket,Aliexpress
     2Contributors: mihdan
     3Tags: Wildberries,Ozon,Yandex Market,Avito,SberMegaMarket
    44Donate link: https://www.kobzarev.com/donate/
    5 Requires at least: 5.2
    6 Tested up to: 6.4
     5Requires at least: 6.5
     6Tested up to: 6.8
    77Requires PHP: 7.4
    8 Stable tag: 0.1.2
     8Stable tag: 0.1.3
    99License: GPL-2.0-or-later
     10License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1011
    1112Link your WooCommerce store to Russian marketplaces and sell more. Adds link-buttons in the card to the same product on marketplaces
     
    7778== Changelog ==
    7879
     80= 0.1.3 (19.04.2025) =
     81- Updated to work with WordPress 6.8+
     82
    7983= 0.1.2 (01.12.2023) =
    80 - Updated to work with WordPress 6.4.+
    81 - Updated to work with WordPress 8.3.+
     84- Updated to work with WordPress 6.4+
     85- Updated to work with WordPress 8.3+
    8286
    8387= 0.1.1 (29.09.2023) =
  • russian-marketplaces-for-woocommerce/trunk/src/Assets.php

    r2932681 r3277132  
    33 * Подключает ассеты.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 */
    77
  • russian-marketplaces-for-woocommerce/trunk/src/Main.php

    r2932681 r3277132  
    33 * Основной файл плагина.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 */
    77
  • russian-marketplaces-for-woocommerce/trunk/src/Marketplace.php

    r2972820 r3277132  
    33 * Абстрактный класс маркетплейса.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 */
    77
     
    4646            [
    4747                'wildberries'    => [
    48                     'name'        => __( 'Wildberries', 'wplovers-woo-russian-marketplaces' ),
     48                    'name'        => __( 'Wildberries', 'woo-russian-marketplaces' ),
    4949                    'css'         => [
    5050                        'background-color' => '#CB11AB',
     
    5454                ],
    5555                'ozon'           => [
    56                     'name'        => __( 'Ozon', 'wplovers-woo-russian-marketplaces' ),
     56                    'name'        => __( 'Ozon', 'woo-russian-marketplaces' ),
    5757                    'css'         => [
    5858                        'background-color' => '#005BFF',
     
    6262                ],
    6363                'yandex_market'  => [
    64                     'name'        => __( 'Yandex Market', 'wplovers-woo-russian-marketplaces' ),
     64                    'name'        => __( 'Yandex Market', 'woo-russian-marketplaces' ),
    6565                    'css'         => [
    6666                        'background-color' => '#FFCC00',
     
    7070                ],
    7171                'avito'          => [
    72                     'name'        => __( 'Avito', 'wplovers-woo-russian-marketplaces' ),
     72                    'name'        => __( 'Avito', 'woo-russian-marketplaces' ),
    7373                    'css'         => [
    7474                        'background-color' => '#00AAFF',
     
    7878                ],
    7979                'lamoda'         => [
    80                     'name'        => __( 'Lamoda', 'wplovers-woo-russian-marketplaces' ),
     80                    'name'        => __( 'Lamoda', 'woo-russian-marketplaces' ),
    8181                    'css'         => [
    8282                        'background-color' => '#000000',
     
    8686                ],
    8787                'sbermegamarket' => [
    88                     'name'        => __( 'SberMegaMarket', 'wplovers-woo-russian-marketplaces' ),
     88                    'name'        => __( 'SberMegaMarket', 'woo-russian-marketplaces' ),
    8989                    'css'         => [
    9090                        'background-color' => '#9B38DC',
     
    9494                ],
    9595                'livemaster'     => [
    96                     'name'        => __( 'Ярмарка мастеров', 'wplovers-woo-russian-marketplaces' ),
     96                    'name'        => __( 'Ярмарка мастеров', 'woo-russian-marketplaces' ),
    9797                    'css'         => [
    9898                        'background-color' => '#EA7913',
     
    102102                ],
    103103                'aliexpress'     => [
    104                     'name'        => __( 'Aliexpress', 'wplovers-woo-russian-marketplaces' ),
     104                    'name'        => __( 'Aliexpress', 'woo-russian-marketplaces' ),
    105105                    'css'         => [
    106106                        'background-color' => '#CC290A',
  • russian-marketplaces-for-woocommerce/trunk/src/Marketplaces/Wildberries.php

    r2932681 r3277132  
    33 * Класс маркетплейса Wildberries.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 */
    77
     
    2929     */
    3030    public function get_name(): string {
    31         return __( 'Wildberries', 'wplovers-woo-russian-marketplaces' );
     31        return __( 'Wildberries', 'woo-russian-marketplaces' );
    3232    }
    3333
  • russian-marketplaces-for-woocommerce/trunk/src/Metabox.php

    r2972820 r3277132  
    33 * Вкладка настроек товара в метабоксе WooCommerce.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 * @link https://woocommerce.com/document/editing-product-data-tabs/
    77 * @link https://misha.agency/course/nastrojki-tovara-woocommerce
     
    8585                    <?php
    8686                    echo wp_kses_post(
    87                         sprintf( __( 'All marketplaces are disabled. Enable at least one in <a href="%s">Settings</a>.', 'wplovers-woo-russian-marketplaces' ), Settings::get_settings_link() )
     87                        /* translators: settings URL */
     88                        sprintf( __( 'All marketplaces are disabled. Enable at least one in <a href="%s">Settings</a>.', 'woo-russian-marketplaces' ), Settings::get_settings_link() )
    8889                    );
    8990                    ?>
    9091                </p>
    9192            <?php else : ?>
    92                 <p><?php esc_html_e( 'Insert links for this product on marketplaces into the fields', 'wplovers-woo-russian-marketplaces' ); ?></p>
     93                <p><?php esc_html_e( 'Insert links for this product on marketplaces into the fields', 'woo-russian-marketplaces' ); ?></p>
    9394            <?php endif; ?>
    9495            <?php
     
    109110            ?>
    110111            <div class="wplovers-gopro">
    111                 <p><b><?php esc_html_e( 'Want to automatically fill in product links?', 'wplovers-woo-russian-marketplaces' ); ?></b> <?php esc_html_e( 'Connect integration with marketplaces and get:', 'wplovers-woo-russian-marketplaces' ); ?></p>
     112                <p><b><?php esc_html_e( 'Want to automatically fill in product links?', 'woo-russian-marketplaces' ); ?></b> <?php esc_html_e( 'Connect integration with marketplaces and get:', 'woo-russian-marketplaces' ); ?></p>
    112113                <ul>
    113                     <li><?php esc_html_e( 'Automatic download and upload products;', 'wplovers-woo-russian-marketplaces' ); ?></li>
    114                     <li><?php esc_html_e( 'Loading orders;', 'wplovers-woo-russian-marketplaces' ); ?></li>
    115                     <li><?php esc_html_e( 'Exchange of balances;', 'wplovers-woo-russian-marketplaces' ); ?></li>
    116                     <li><?php esc_html_e( 'Flexible pricing.', 'wplovers-woo-russian-marketplaces' ); ?></li>
     114                    <li><?php esc_html_e( 'Automatic download and upload products;', 'woo-russian-marketplaces' ); ?></li>
     115                    <li><?php esc_html_e( 'Loading orders;', 'woo-russian-marketplaces' ); ?></li>
     116                    <li><?php esc_html_e( 'Exchange of balances;', 'woo-russian-marketplaces' ); ?></li>
     117                    <li><?php esc_html_e( 'Flexible pricing.', 'woo-russian-marketplaces' ); ?></li>
    117118                </ul>
    118                 <p><a href="<?php echo esc_url( Settings::get_gopro_link() ); ?>"><b><?php esc_html_e( 'Yes, I want to automate everything!', 'wplovers-woo-russian-marketplaces' ); ?></b></a></p>
     119                <p><a href="<?php echo esc_url( Settings::get_gopro_link() ); ?>"><b><?php esc_html_e( 'Yes, I want to automate everything!', 'woo-russian-marketplaces' ); ?></b></a></p>
    119120            </div>
    120121        </div>
  • russian-marketplaces-for-woocommerce/trunk/src/Settings.php

    r2932681 r3277132  
    33 * Настройки плагина.
    44 *
    5  * @package wplovers-woo-russian-marketplaces;
     5 * @package woo-russian-marketplaces;
    66 * @link https://woocommerce.com/document/adding-a-section-to-a-settings-tab/
    77 * @link https://www.tychesoftwares.com/how-to-add-custom-sections-fields-in-woocommerce-settings/
     
    2424     * Идентификатор секции.
    2525     */
    26     const SECTION_SLUG = 'wplovers-woo-russian-marketplaces';
     26    const SECTION_SLUG = 'woo-russian-marketplaces';
    2727
    2828    /**
     
    7272
    7373        add_action(
    74             'admin_head',
     74            'admin_enqueue_scripts',
    7575            function () {
    76                 ?>
    77                 <script>
    78                     jQuery( function ( $ ) {
    79                         const
    80                             collapsed_class = 'wplovers-spoiler--collapsed',
    81                             $spoilers       = $( '.wplovers-spoiler' );
    82 
    83                         $( '.wplovers-spoiler__name' ).on(
    84                             'click',
    85                             function () {
    86                                 //$spoilers.addClass( collapsed_class );
    87                                 $( this ).parents( '.wplovers-spoiler' ).toggleClass( collapsed_class );
    88                             }
    89                         );
    90                     } );
    91                 </script>
    92                 <?php
     76                wp_enqueue_script(
     77                    Utils::get_plugin_slug(),
     78                    Utils::get_plugin_url() . 'assets/js/admin.js',
     79                    [ 'jquery' ],
     80                    filemtime( Utils::get_plugin_path() . 'assets/js/admin.js' )
     81                );
    9382            }
    9483        );
     
    133122                '<a href="%s">%s</a>',
    134123                self::get_settings_link(),
    135                 esc_html__( 'Settings', 'wplovers-woo-russian-marketplaces' )
     124                esc_html__( 'Settings', 'woo-russian-marketplaces' )
    136125            );
    137126
     
    139128                '<a href="%s" style="font-weight: bold; color: #524cff">%s</a>',
    140129                self::get_gopro_link(),
    141                 esc_html__( 'Get full integrations!', 'wplovers-woo-russian-marketplaces' )
     130                esc_html__( 'Get full integrations!', 'woo-russian-marketplaces' )
    142131            );
    143132
     
    231220                'text' => sprintf(
    232221                    '<h1>%s</h1>',
    233                     __( 'Russian marketplaces settings', 'wplovers-woo-russian-marketplaces' )
     222                    __( 'Russian marketplaces settings', 'woo-russian-marketplaces' )
    234223                ),
    235224                'id'   => 'info',
     
    239228        $settings_slider[] = $this->add_field(
    240229            [
    241                 'name' => __( 'Buttons block design', 'wplovers-woo-russian-marketplaces' ),
     230                'name' => __( 'Buttons block design', 'woo-russian-marketplaces' ),
    242231                'type' => 'title',
    243                 'desc' => __( 'Settings of the main block with buttons-links to marketplaces', 'wplovers-woo-russian-marketplaces' ),
     232                'desc' => __( 'Settings of the main block with buttons-links to marketplaces', 'woo-russian-marketplaces' ),
    244233                'id'   => 'buttons_block_design',
    245234            ]
     
    248237        $settings_slider[] = $this->add_field(
    249238            [
    250                 'name'        => __( 'Margin top', 'wplovers-woo-russian-marketplaces' ),
     239                'name'        => __( 'Margin top', 'woo-russian-marketplaces' ),
    251240                'type'        => 'number',
    252241                'id'          => 'buttons_block_design_margin_top',
     
    259248        $settings_slider[] = $this->add_field(
    260249            [
    261                 'name'        => __( 'Margin bottom', 'wplovers-woo-russian-marketplaces' ),
     250                'name'        => __( 'Margin bottom', 'woo-russian-marketplaces' ),
    262251                'type'        => 'number',
    263252                'id'          => 'buttons_block_design_margin_bottom',
     
    270259        $settings_slider[] = $this->add_field(
    271260            [
    272                 'name'        => __( 'Padding', 'wplovers-woo-russian-marketplaces' ),
    273                 'desc'        => __( 'Sets padding on all sides of the block', 'wplovers-woo-russian-marketplaces' ),
     261                'name'        => __( 'Padding', 'woo-russian-marketplaces' ),
     262                'desc'        => __( 'Sets padding on all sides of the block', 'woo-russian-marketplaces' ),
    274263                'type'        => 'number',
    275264                'id'          => 'buttons_block_design_padding',
     
    282271        $settings_slider[] = $this->add_field(
    283272            [
    284                 'name'        => __( 'Background color', 'wplovers-woo-russian-marketplaces' ),
     273                'name'        => __( 'Background color', 'woo-russian-marketplaces' ),
    285274                'type'        => 'color',
    286275                'id'          => 'buttons_block_design_background_color',
     
    293282        $settings_slider[] = $this->add_field(
    294283            [
    295                 'name'        => __( 'Border width', 'wplovers-woo-russian-marketplaces' ),
     284                'name'        => __( 'Border width', 'woo-russian-marketplaces' ),
    296285                'type'        => 'number',
    297286                'id'          => 'buttons_block_design_border_width',
     
    304293        $settings_slider[] = $this->add_field(
    305294            [
    306                 'name'        => __( 'Border radius', 'wplovers-woo-russian-marketplaces' ),
     295                'name'        => __( 'Border radius', 'woo-russian-marketplaces' ),
    307296                'type'        => 'number',
    308297                'id'          => 'buttons_block_design_border_radius',
     
    315304        $settings_slider[] = $this->add_field(
    316305            [
    317                 'name'        => __( 'Border color', 'wplovers-woo-russian-marketplaces' ),
     306                'name'        => __( 'Border color', 'woo-russian-marketplaces' ),
    318307                'type'        => 'color',
    319308                'id'          => 'buttons_block_design_border_color',
     
    326315        $settings_slider[] = $this->add_field(
    327316            [
    328                 'name'    => __( 'Where to place', 'wplovers-woo-russian-marketplaces' ),
     317                'name'    => __( 'Where to place', 'woo-russian-marketplaces' ),
    329318                'type'    => 'radio',
    330319                'id'      => 'buttons_block_design_where_to_place',
    331320                'options' => [
    332                     'before' => __( 'Before Add to cart block', 'wplovers-woo-russian-marketplaces' ),
    333                     'after'  => __( 'After Add to cart block', 'wplovers-woo-russian-marketplaces' ),
     321                    'before' => __( 'Before Add to cart block', 'woo-russian-marketplaces' ),
     322                    'after'  => __( 'After Add to cart block', 'woo-russian-marketplaces' ),
    334323                ],
    335324                'default' => 'after',
     
    346335        $settings_slider[] = $this->add_field(
    347336            [
    348                 'name' => __( 'Block title', 'wplovers-woo-russian-marketplaces' ),
     337                'name' => __( 'Block title', 'woo-russian-marketplaces' ),
    349338                'type' => 'title',
    350                 'desc' => __( 'Write your call to buy on marketplaces', 'wplovers-woo-russian-marketplaces' ),
     339                'desc' => __( 'Write your call to buy on marketplaces', 'woo-russian-marketplaces' ),
    351340                'id'   => 'block_title',
    352341            ]
     
    355344        $settings_slider[] = $this->add_field(
    356345            [
    357                 'name'    => __( 'Text', 'wplovers-woo-russian-marketplaces' ),
     346                'name'    => __( 'Text', 'woo-russian-marketplaces' ),
    358347                'type'    => 'text',
    359348                'id'      => 'block_title_text',
    360                 'default' => __( 'Buy this product on marketplaces', 'wplovers-woo-russian-marketplaces' ),
     349                'default' => __( 'Buy this product on marketplaces', 'woo-russian-marketplaces' ),
    361350                'css'     => 'width:260px',
    362351            ]
     
    365354        $settings_slider[] = $this->add_field(
    366355            [
    367                 'name'        => __( 'Margin bottom', 'wplovers-woo-russian-marketplaces' ),
     356                'name'        => __( 'Margin bottom', 'woo-russian-marketplaces' ),
    368357                'type'        => 'number',
    369358                'id'          => 'block_title_margin_bottom',
     
    376365        $settings_slider[] = $this->add_field(
    377366            [
    378                 'name'        => __( 'Font size', 'wplovers-woo-russian-marketplaces' ),
     367                'name'        => __( 'Font size', 'woo-russian-marketplaces' ),
    379368                'type'        => 'number',
    380369                'id'          => 'block_title_font_size',
     
    387376        $settings_slider[] = $this->add_field(
    388377            [
    389                 'name'        => __( 'Color', 'wplovers-woo-russian-marketplaces' ),
     378                'name'        => __( 'Color', 'woo-russian-marketplaces' ),
    390379                'type'        => 'color',
    391380                'id'          => 'block_title_color',
     
    408397        $settings_slider[] = $this->add_field(
    409398            [
    410                 'name' => __( 'Marketplaces', 'wplovers-woo-russian-marketplaces' ),
     399                'name' => __( 'Marketplaces', 'woo-russian-marketplaces' ),
    411400                'type' => 'title',
    412401                'id'   => 'marketplaces',
     
    416405        $settings_slider[] = $this->add_field(
    417406            [
    418                 'name'        => __( 'Buttons border width', 'wplovers-woo-russian-marketplaces' ),
     407                'name'        => __( 'Buttons border width', 'woo-russian-marketplaces' ),
    419408                'type'        => 'number',
    420409                'id'          => 'button_border_width',
     
    427416        $settings_slider[] = $this->add_field(
    428417            [
    429                 'name'        => __( 'Buttons border radius', 'wplovers-woo-russian-marketplaces' ),
     418                'name'        => __( 'Buttons border radius', 'woo-russian-marketplaces' ),
    430419                'type'        => 'number',
    431420                'id'          => 'button_border_radius',
     
    438427        $settings_slider[] = $this->add_field(
    439428            [
    440                 'name'        => __( 'Buttons font size', 'wplovers-woo-russian-marketplaces' ),
     429                'name'        => __( 'Buttons font size', 'woo-russian-marketplaces' ),
    441430                'type'        => 'number',
    442431                'id'          => 'button_font_size',
     
    479468            $settings_slider[] = $this->add_field(
    480469                [
    481                     'name'    => __( 'On/Off', 'wplovers-woo-russian-marketplaces' ),
     470                    'name'    => __( 'On/Off', 'woo-russian-marketplaces' ),
    482471                    'type'    => 'checkbox',
    483472                    'default' => 'no',
     
    488477            $settings_slider[] = $this->add_field(
    489478                [
    490                     'name'        => __( 'Button background color', 'wplovers-woo-russian-marketplaces' ),
     479                    'name'        => __( 'Button background color', 'woo-russian-marketplaces' ),
    491480                    'type'        => 'color',
    492481                    'default'     => $data['css']['background-color'],
     
    499488            $settings_slider[] = $this->add_field(
    500489                [
    501                     'name'        => __( 'Button border color', 'wplovers-woo-russian-marketplaces' ),
     490                    'name'        => __( 'Button border color', 'woo-russian-marketplaces' ),
    502491                    'type'        => 'color',
    503492                    'id'          => 'marketplaces_' . $marketplace_id . '_border_color',
     
    510499            $settings_slider[] = $this->add_field(
    511500                [
    512                     'name'        => __( 'Marketplace name color', 'wplovers-woo-russian-marketplaces' ),
     501                    'name'        => __( 'Marketplace name color', 'woo-russian-marketplaces' ),
    513502                    'type'        => 'color',
    514503                    'id'          => 'marketplaces_' . $marketplace_id . '_color',
     
    521510            $settings_slider[] = $this->add_field(
    522511                [
    523                     'name' => __( 'Go Pro', 'wplovers-woo-russian-marketplaces' ),
     512                    'name' => __( 'Go Pro', 'woo-russian-marketplaces' ),
    524513                    'type' => 'html',
    525514                    'id'   => 'marketplaces_' . $marketplace_id . '_gopro',
     
    545534        $settings_slider[] = $this->add_field(
    546535            [
    547                 'name' => __( 'SEO', 'wplovers-woo-russian-marketplaces' ),
     536                'name' => __( 'SEO', 'woo-russian-marketplaces' ),
    548537                'type' => 'title',
    549538                'id'   => 'seo',
     
    553542        $settings_slider[] = $this->add_field(
    554543            [
    555                 'name'    => __( 'Wrap links with noindex', 'wplovers-woo-russian-marketplaces' ),
     544                'name'    => __( 'Wrap links with noindex', 'woo-russian-marketplaces' ),
    556545                'type'    => 'checkbox',
    557546                'default' => 'no',
     
    562551        $settings_slider[] = $this->add_field(
    563552            [
    564                 'name'    => __( 'Add nofollow attribute to links', 'wplovers-woo-russian-marketplaces' ),
     553                'name'    => __( 'Add nofollow attribute to links', 'woo-russian-marketplaces' ),
    565554                'type'    => 'checkbox',
    566555                'default' => 'no',
     
    571560        $settings_slider[] = $this->add_field(
    572561            [
    573                 'name'    => __( 'Open links in a new tab', 'wplovers-woo-russian-marketplaces' ),
     562                'name'    => __( 'Open links in a new tab', 'woo-russian-marketplaces' ),
    574563                'type'    => 'checkbox',
    575564                'default' => 'no',
     
    640629        ?>
    641630        <div class="wplovers-gopro">
    642             <p><b><?php esc_html_e( 'Want to automatically fill in product links?', 'wplovers-woo-russian-marketplaces' ); ?></b> <?php esc_html_e( 'Connect integration with marketplaces and get:', 'wplovers-woo-russian-marketplaces' ); ?></p>
     631            <p><b><?php esc_html_e( 'Want to automatically fill in product links?', 'woo-russian-marketplaces' ); ?></b> <?php esc_html_e( 'Connect integration with marketplaces and get:', 'woo-russian-marketplaces' ); ?></p>
    643632            <ul>
    644                 <li><?php esc_html_e( 'Automatic download and upload products;', 'wplovers-woo-russian-marketplaces' ); ?></li>
    645                 <li><?php esc_html_e( 'Loading orders;', 'wplovers-woo-russian-marketplaces' ); ?></li>
    646                 <li><?php esc_html_e( 'Exchange of balances;', 'wplovers-woo-russian-marketplaces' ); ?></li>
    647                 <li><?php esc_html_e( 'Flexible pricing.', 'wplovers-woo-russian-marketplaces' ); ?></li>
     633                <li><?php esc_html_e( 'Automatic download and upload products;', 'woo-russian-marketplaces' ); ?></li>
     634                <li><?php esc_html_e( 'Loading orders;', 'woo-russian-marketplaces' ); ?></li>
     635                <li><?php esc_html_e( 'Exchange of balances;', 'woo-russian-marketplaces' ); ?></li>
     636                <li><?php esc_html_e( 'Flexible pricing.', 'woo-russian-marketplaces' ); ?></li>
    648637            </ul>
    649             <p><a href="<?php echo esc_url( self::get_gopro_link() ); ?>"><b><?php esc_html_e( 'Yes, I want to automate everything!', 'wplovers-woo-russian-marketplaces' ); ?></b></a></p>
     638            <p><a href="<?php echo esc_url( self::get_gopro_link() ); ?>"><b><?php esc_html_e( 'Yes, I want to automate everything!', 'woo-russian-marketplaces' ); ?></b></a></p>
    650639        </div>
    651640        <?php
  • russian-marketplaces-for-woocommerce/trunk/src/Utils.php

    r2932681 r3277132  
    33 * Полезные утилиты для плагина.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 */
    77
  • russian-marketplaces-for-woocommerce/trunk/src/Widget.php

    r2932681 r3277132  
    33 * Вывод виджета во фронтенде.
    44 *
    5  * @package wplovers-woo-russian-marketplaces
     5 * @package woo-russian-marketplaces
    66 */
    77
     
    2323            add_action( 'woocommerce_before_add_to_cart_form', [ $this, 'add_block' ] );
    2424        }
     25
     26        add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_scripts' ], 11 );
     27    }
     28
     29    public function enqueue_scripts(): void {
     30        $urls         = get_post_meta( get_the_ID(), Utils::get_plugin_prefix(), true );
     31        $marketplaces = Marketplace::get_merketplaces();
     32        $settings     = Settings::get_options();
     33        ob_start();
     34        ?>
     35        .woo-russian-marketplaces {
     36            background-color: <?php echo esc_html( $settings['buttons_block_design_background_color'] ); ?>;
     37            padding: <?php echo esc_html( $settings['buttons_block_design_padding'] ); ?>px;
     38            border-radius: <?php echo esc_html( $settings['buttons_block_design_border_radius'] ); ?>px;
     39            margin-top: <?php echo esc_html( $settings['buttons_block_design_margin_top'] ); ?>px;
     40            margin-bottom: <?php echo esc_html( $settings['buttons_block_design_margin_bottom'] ); ?>px;
     41            border-width: <?php echo esc_html( $settings['buttons_block_design_border_width'] ); ?>px;
     42            border-style: solid;
     43            border-color: <?php echo esc_html( $settings['buttons_block_design_border_color'] ); ?>;
     44        }
     45        .woo-russian-marketplaces .woo-russian-marketplaces__header {
     46            font-weight: 700;
     47            margin-bottom: <?php echo esc_html( $settings['block_title_margin_bottom'] ); ?>px;
     48            font-size: <?php echo esc_html( $settings['block_title_font_size'] ); ?>px;
     49            color: <?php echo esc_html( $settings['block_title_color'] ); ?>;
     50        }
     51        .woo-russian-marketplaces .woo-russian-marketplaces__list {
     52            display: flex;
     53            flex-direction: row;
     54            flex-wrap: wrap;
     55            gap: 15px;
     56            align-items: center;
     57            justify-content: flex-start;
     58        }
     59        .woo-russian-marketplaces .woo-russian-marketplaces__link {
     60            text-decoration: none;
     61            text-transform: uppercase;
     62            padding: 8px 22px;
     63            -webkit-transition: all 300ms ease;
     64            transition: all 300ms ease;
     65            border-style: solid;
     66            border-width: <?php echo esc_html( $settings['button_border_width'] ); ?>px;
     67            font-size: <?php echo esc_html( $settings['button_font_size'] ); ?>px;
     68            border-radius: <?php echo esc_html( $settings['button_border_radius'] ); ?>px;
     69        }
     70        .woo-russian-marketplaces .woo-russian-marketplaces__link:hover {
     71            opacity: 0.8;
     72        }
     73        <?php foreach ( $urls as $marketplace => $url ) : ?>
     74            <?php
     75            if ( empty( $url ) ) {
     76                continue;
     77            }
     78            ?>
     79            .woo-russian-marketplaces .woo-russian-marketplaces__link--<?php echo esc_html( $marketplace ); ?> {
     80                background-color: <?php echo esc_html( $settings[ 'marketplaces_' . $marketplace . '_background_color' ] ); ?>;
     81                border-color: <?php echo esc_html( $settings[ 'marketplaces_' . $marketplace . '_border_color' ] ); ?>;
     82                color: <?php echo esc_html( $settings[ 'marketplaces_' . $marketplace . '_color' ] ); ?>;
     83            }
     84        <?php endforeach; ?>
     85        <?php
     86        wp_add_inline_style( 'photoswipe', ob_get_clean() );
    2587    }
    2688
     
    40102                    sprintf(
    41103                    /* translators: plugin name, settings link */
    42                         __( 'Плагин "%1$s" активирован, но не настроен! <a href="%2$s">Настроить плагин.</a>', 'wplovers-woo-russian-marketplaces' ),
     104                        __( 'Плагин "%1$s" активирован, но не настроен! <a href="%2$s">Настроить плагин.</a>', 'woo-russian-marketplaces' ),
    43105                        Utils::get_plugin_name(),
    44106                        Settings::get_settings_link()
     
    91153                </div>
    92154            </div>
    93             <style>
    94                 .wplovers-woo-russian-marketplaces {
    95                     background-color: <?php echo esc_html( $settings['buttons_block_design_background_color'] ); ?>;
    96                     padding: <?php echo esc_html( $settings['buttons_block_design_padding'] ); ?>px;
    97                     border-radius: <?php echo esc_html( $settings['buttons_block_design_border_radius'] ); ?>px;
    98                     margin-top: <?php echo esc_html( $settings['buttons_block_design_margin_top'] ); ?>px;
    99                     margin-bottom: <?php echo esc_html( $settings['buttons_block_design_margin_bottom'] ); ?>px;
    100                     border-width: <?php echo esc_html( $settings['buttons_block_design_border_width'] ); ?>px;
    101                     border-style: solid;
    102                     border-color: <?php echo esc_html( $settings['buttons_block_design_border_color'] ); ?>;
    103                 }
    104                 .wplovers-woo-russian-marketplaces .wplovers-woo-russian-marketplaces__header {
    105                     font-weight: 700;
    106                     margin-bottom: <?php echo esc_html( $settings['block_title_margin_bottom'] ); ?>px;
    107                     font-size: <?php echo esc_html( $settings['block_title_font_size'] ); ?>px;
    108                     color: <?php echo esc_html( $settings['block_title_color'] ); ?>;
    109                 }
    110                 .wplovers-woo-russian-marketplaces .wplovers-woo-russian-marketplaces__list {
    111                     display: flex;
    112                     flex-direction: row;
    113                     flex-wrap: wrap;
    114                     gap: 15px;
    115                     align-items: center;
    116                     justify-content: flex-start;
    117                 }
    118                 .wplovers-woo-russian-marketplaces .wplovers-woo-russian-marketplaces__link {
    119                     text-decoration: none;
    120                     text-transform: uppercase;
    121                     padding: 8px 22px;
    122                     -webkit-transition: all 300ms ease;
    123                     transition: all 300ms ease;
    124                     border-style: solid;
    125                     border-width: <?php echo esc_html( $settings['button_border_width'] ); ?>px;
    126                     font-size: <?php echo esc_html( $settings['button_font_size'] ); ?>px;
    127                     border-radius: <?php echo esc_html( $settings['button_border_radius'] ); ?>px;
    128                 }
    129                 .wplovers-woo-russian-marketplaces .wplovers-woo-russian-marketplaces__link:hover {
    130                     opacity: 0.8;
    131                 }
    132                 <?php foreach ( $urls as $marketplace => $url ) : ?>
    133                     <?php
    134                     if ( empty( $url ) ) {
    135                         continue;
    136                     }
    137                     ?>
    138                     .wplovers-woo-russian-marketplaces .wplovers-woo-russian-marketplaces__link--<?php echo esc_html( $marketplace ); ?> {
    139                         background-color: <?php echo esc_html( $settings[ 'marketplaces_' . $marketplace . '_background_color' ] ); ?>;
    140                         border-color: <?php echo esc_html( $settings[ 'marketplaces_' . $marketplace . '_border_color' ] ); ?>;
    141                         color: <?php echo esc_html( $settings[ 'marketplaces_' . $marketplace . '_color' ] ); ?>;
    142                     }
    143                 <?php endforeach; ?>
    144             </style>
    145155        <?php endif; ?>
    146156        <?php
  • russian-marketplaces-for-woocommerce/trunk/vendor/autoload.php

    r3004283 r3277132  
    1515        }
    1616    }
    17     trigger_error(
    18         $err,
    19         E_USER_ERROR
    20     );
     17    throw new RuntimeException($err);
    2118}
    2219
  • russian-marketplaces-for-woocommerce/trunk/vendor/composer/InstalledVersions.php

    r2932681 r3277132  
    2828{
    2929    /**
     30     * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
     31     * @internal
     32     */
     33    private static $selfDir = null;
     34
     35    /**
    3036     * @var mixed[]|null
    3137     * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
    3238     */
    3339    private static $installed;
     40
     41    /**
     42     * @var bool
     43     */
     44    private static $installedIsLocalDir;
    3445
    3546    /**
     
    310321        self::$installed = $data;
    311322        self::$installedByVendor = array();
     323
     324        // when using reload, we disable the duplicate protection to ensure that self::$installed data is
     325        // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
     326        // so we have to assume it does not, and that may result in duplicate data being returned when listing
     327        // all installed packages for example
     328        self::$installedIsLocalDir = false;
     329    }
     330
     331    /**
     332     * @return string
     333     */
     334    private static function getSelfDir()
     335    {
     336        if (self::$selfDir === null) {
     337            self::$selfDir = strtr(__DIR__, '\\', '/');
     338        }
     339
     340        return self::$selfDir;
    312341    }
    313342
     
    323352
    324353        $installed = array();
     354        $copiedLocalDir = false;
    325355
    326356        if (self::$canGetVendors) {
     357            $selfDir = self::getSelfDir();
    327358            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
     359                $vendorDir = strtr($vendorDir, '\\', '/');
    328360                if (isset(self::$installedByVendor[$vendorDir])) {
    329361                    $installed[] = self::$installedByVendor[$vendorDir];
     
    331363                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
    332364                    $required = require $vendorDir.'/composer/installed.php';
    333                     $installed[] = self::$installedByVendor[$vendorDir] = $required;
    334                     if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    335                         self::$installed = $installed[count($installed) - 1];
     365                    self::$installedByVendor[$vendorDir] = $required;
     366                    $installed[] = $required;
     367                    if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
     368                        self::$installed = $required;
     369                        self::$installedIsLocalDir = true;
    336370                    }
     371                }
     372                if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
     373                    $copiedLocalDir = true;
    337374                }
    338375            }
     
    351388        }
    352389
    353         if (self::$installed !== array()) {
     390        if (self::$installed !== array() && !$copiedLocalDir) {
    354391            $installed[] = self::$installed;
    355392        }
  • russian-marketplaces-for-woocommerce/trunk/vendor/composer/installed.php

    r3004283 r3277132  
    22    'root' => array(
    33        'name' => 'wplovers/woo-russian-marketplace',
    4         'pretty_version' => '0.1.2',
    5         'version' => '0.1.2.0',
    6         'reference' => '18261b156a42845dcb29afb3a51c4cf8e2e58dcb',
     4        'pretty_version' => '0.1.3',
     5        'version' => '0.1.3.0',
     6        'reference' => '038513384485353994c96b39898b927d96fc33d8',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'wplovers/woo-russian-marketplace' => array(
    14             'pretty_version' => '0.1.2',
    15             'version' => '0.1.2.0',
    16             'reference' => '18261b156a42845dcb29afb3a51c4cf8e2e58dcb',
     14            'pretty_version' => '0.1.3',
     15            'version' => '0.1.3.0',
     16            'reference' => '038513384485353994c96b39898b927d96fc33d8',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • russian-marketplaces-for-woocommerce/trunk/woo-russian-marketplaces.php

    r3004283 r3277132  
    22/**
    33 * Plugin Name: Russian marketplaces for WooCommerce
     4 * Plugin URI:https://www.kobzarev.com/
    45 * Description: Добавьте ссылки на свои товары в Российских маркетплейсах.
    5  * Author: WPlovers
    6  * Author URI: https://wplovers.pro/
    7  * Version: 0.1.2
     6 * Author: mihdan
     7 * Author URI: https://www.kobzarev.com/
     8 * Version: 0.1.3
     9 * Requires at least: 6.5
     10 * Requires PHP: 7.4
     11 * License: GPLv2 or later
     12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
     13 * Text Domain: woo-russian-marketplaces
     14 * Requires Plugins: woocommerce
    815 *
    9  * @package wplovers-woo-russian-marketplaces
     16 * @package woo-russian-marketplaces
    1017 */
    1118
     
    1320
    1421define( 'WPL_WOO_RUSSIAN_MARKETPLACES_NAME', 'Russian marketplaces for WooCommerce' );
    15 define( 'WPL_WOO_RUSSIAN_MARKETPLACES_SLUG', 'wplovers-woo-russian-marketplaces' );
    16 define( 'WPL_WOO_RUSSIAN_MARKETPLACES_PREFIX', 'wplovers_woo_russian_marketplaces' );
     22define( 'WPL_WOO_RUSSIAN_MARKETPLACES_SLUG', 'woo-russian-marketplaces' );
     23define( 'WPL_WOO_RUSSIAN_MARKETPLACES_PREFIX', 'woo_russian_marketplaces' );
    1724define( 'WPL_WOO_RUSSIAN_MARKETPLACES_BASENAME', plugin_basename( __FILE__ ) );
    1825define( 'WPL_WOO_RUSSIAN_MARKETPLACES_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.