Changeset 3083378
- Timestamp:
- 05/08/2024 01:54:55 PM (21 months ago)
- Location:
- woocommerce-shipping-gateway-per-product
- Files:
-
- 220 added
- 3 edited
-
tags/2.4.2 (added)
-
tags/2.4.2/css (added)
-
tags/2.4.2/css/addons-style.min.css (added)
-
tags/2.4.2/css/addons.css (added)
-
tags/2.4.2/css/style.css (added)
-
tags/2.4.2/freemius (added)
-
tags/2.4.2/freemius/LICENSE.txt (added)
-
tags/2.4.2/freemius/assets (added)
-
tags/2.4.2/freemius/assets/css (added)
-
tags/2.4.2/freemius/assets/css/admin (added)
-
tags/2.4.2/freemius/assets/css/admin/account.css (added)
-
tags/2.4.2/freemius/assets/css/admin/add-ons.css (added)
-
tags/2.4.2/freemius/assets/css/admin/affiliation.css (added)
-
tags/2.4.2/freemius/assets/css/admin/checkout.css (added)
-
tags/2.4.2/freemius/assets/css/admin/clone-resolution.css (added)
-
tags/2.4.2/freemius/assets/css/admin/common.css (added)
-
tags/2.4.2/freemius/assets/css/admin/connect.css (added)
-
tags/2.4.2/freemius/assets/css/admin/debug.css (added)
-
tags/2.4.2/freemius/assets/css/admin/dialog-boxes.css (added)
-
tags/2.4.2/freemius/assets/css/admin/gdpr-optin-notice.css (added)
-
tags/2.4.2/freemius/assets/css/admin/index.php (added)
-
tags/2.4.2/freemius/assets/css/admin/optout.css (added)
-
tags/2.4.2/freemius/assets/css/admin/plugins.css (added)
-
tags/2.4.2/freemius/assets/css/customizer.css (added)
-
tags/2.4.2/freemius/assets/css/index.php (added)
-
tags/2.4.2/freemius/assets/img (added)
-
tags/2.4.2/freemius/assets/img/dfm-shipping-gateway-per-product-for-woocommerce.png (added)
-
tags/2.4.2/freemius/assets/img/index.php (added)
-
tags/2.4.2/freemius/assets/img/plugin-icon.png (added)
-
tags/2.4.2/freemius/assets/img/theme-icon.png (added)
-
tags/2.4.2/freemius/assets/index.php (added)
-
tags/2.4.2/freemius/assets/js (added)
-
tags/2.4.2/freemius/assets/js/index.php (added)
-
tags/2.4.2/freemius/assets/js/nojquery.ba-postmessage.js (added)
-
tags/2.4.2/freemius/assets/js/nojquery.ba-postmessage.min.js (added)
-
tags/2.4.2/freemius/assets/js/postmessage.js (added)
-
tags/2.4.2/freemius/config.php (added)
-
tags/2.4.2/freemius/includes (added)
-
tags/2.4.2/freemius/includes/class-freemius-abstract.php (added)
-
tags/2.4.2/freemius/includes/class-freemius.php (added)
-
tags/2.4.2/freemius/includes/class-fs-admin-notices.php (added)
-
tags/2.4.2/freemius/includes/class-fs-api.php (added)
-
tags/2.4.2/freemius/includes/class-fs-garbage-collector.php (added)
-
tags/2.4.2/freemius/includes/class-fs-lock.php (added)
-
tags/2.4.2/freemius/includes/class-fs-logger.php (added)
-
tags/2.4.2/freemius/includes/class-fs-options.php (added)
-
tags/2.4.2/freemius/includes/class-fs-plugin-updater.php (added)
-
tags/2.4.2/freemius/includes/class-fs-security.php (added)
-
tags/2.4.2/freemius/includes/class-fs-storage.php (added)
-
tags/2.4.2/freemius/includes/class-fs-user-lock.php (added)
-
tags/2.4.2/freemius/includes/customizer (added)
-
tags/2.4.2/freemius/includes/customizer/class-fs-customizer-support-section.php (added)
-
tags/2.4.2/freemius/includes/customizer/class-fs-customizer-upsell-control.php (added)
-
tags/2.4.2/freemius/includes/customizer/index.php (added)
-
tags/2.4.2/freemius/includes/debug (added)
-
tags/2.4.2/freemius/includes/debug/class-fs-debug-bar-panel.php (added)
-
tags/2.4.2/freemius/includes/debug/debug-bar-start.php (added)
-
tags/2.4.2/freemius/includes/debug/index.php (added)
-
tags/2.4.2/freemius/includes/entities (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-affiliate-terms.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-affiliate.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-billing.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-entity.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-payment.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-plugin-info.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-plugin-license.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-plugin-plan.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-plugin-tag.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-plugin.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-pricing.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-scope-entity.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-site.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-subscription.php (added)
-
tags/2.4.2/freemius/includes/entities/class-fs-user.php (added)
-
tags/2.4.2/freemius/includes/entities/index.php (added)
-
tags/2.4.2/freemius/includes/fs-core-functions.php (added)
-
tags/2.4.2/freemius/includes/fs-essential-functions.php (added)
-
tags/2.4.2/freemius/includes/fs-html-escaping-functions.php (added)
-
tags/2.4.2/freemius/includes/fs-plugin-info-dialog.php (added)
-
tags/2.4.2/freemius/includes/index.php (added)
-
tags/2.4.2/freemius/includes/l10n.php (added)
-
tags/2.4.2/freemius/includes/managers (added)
-
tags/2.4.2/freemius/includes/managers/class-fs-admin-menu-manager.php (added)
-
tags/2.4.2/freemius/includes/managers/class-fs-admin-notice-manager.php (added)
-
tags/2.4.2/freemius/includes/managers/class-fs-cache-manager.php (added)
-
tags/2.4.2/freemius/includes/managers/class-fs-clone-manager.php (added)
-
tags/2.4.2/freemius/includes/managers/class-fs-gdpr-manager.php (added)
-
tags/2.4.2/freemius/includes/managers/class-fs-key-value-storage.php (added)
-
tags/2.4.2/freemius/includes/managers/class-fs-license-manager.php (added)
-
tags/2.4.2/freemius/includes/managers/class-fs-option-manager.php (added)
-
tags/2.4.2/freemius/includes/managers/class-fs-permission-manager.php (added)
-
tags/2.4.2/freemius/includes/managers/class-fs-plan-manager.php (added)
-
tags/2.4.2/freemius/includes/managers/class-fs-plugin-manager.php (added)
-
tags/2.4.2/freemius/includes/managers/index.php (added)
-
tags/2.4.2/freemius/includes/sdk (added)
-
tags/2.4.2/freemius/includes/sdk/Exceptions (added)
-
tags/2.4.2/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php (added)
-
tags/2.4.2/freemius/includes/sdk/Exceptions/EmptyArgumentException.php (added)
-
tags/2.4.2/freemius/includes/sdk/Exceptions/Exception.php (added)
-
tags/2.4.2/freemius/includes/sdk/Exceptions/InvalidArgumentException.php (added)
-
tags/2.4.2/freemius/includes/sdk/Exceptions/OAuthException.php (added)
-
tags/2.4.2/freemius/includes/sdk/Exceptions/index.php (added)
-
tags/2.4.2/freemius/includes/sdk/FreemiusBase.php (added)
-
tags/2.4.2/freemius/includes/sdk/FreemiusWordPress.php (added)
-
tags/2.4.2/freemius/includes/sdk/LICENSE.txt (added)
-
tags/2.4.2/freemius/includes/sdk/index.php (added)
-
tags/2.4.2/freemius/includes/supplements (added)
-
tags/2.4.2/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php (added)
-
tags/2.4.2/freemius/includes/supplements/fs-essential-functions-2.2.1.php (added)
-
tags/2.4.2/freemius/includes/supplements/fs-migration-2.5.1.php (added)
-
tags/2.4.2/freemius/includes/supplements/index.php (added)
-
tags/2.4.2/freemius/index.php (added)
-
tags/2.4.2/freemius/languages (added)
-
tags/2.4.2/freemius/languages/freemius-cs_CZ.mo (added)
-
tags/2.4.2/freemius/languages/freemius-da_DK.mo (added)
-
tags/2.4.2/freemius/languages/freemius-de_DE.mo (added)
-
tags/2.4.2/freemius/languages/freemius-en.mo (added)
-
tags/2.4.2/freemius/languages/freemius-es_ES.mo (added)
-
tags/2.4.2/freemius/languages/freemius-fr_FR.mo (added)
-
tags/2.4.2/freemius/languages/freemius-he_IL.mo (added)
-
tags/2.4.2/freemius/languages/freemius-hu_HU.mo (added)
-
tags/2.4.2/freemius/languages/freemius-it_IT.mo (added)
-
tags/2.4.2/freemius/languages/freemius-ja.mo (added)
-
tags/2.4.2/freemius/languages/freemius-nl_NL.mo (added)
-
tags/2.4.2/freemius/languages/freemius-ru_RU.mo (added)
-
tags/2.4.2/freemius/languages/freemius-ta.mo (added)
-
tags/2.4.2/freemius/languages/freemius-zh_CN.mo (added)
-
tags/2.4.2/freemius/languages/freemius.pot (added)
-
tags/2.4.2/freemius/languages/index.php (added)
-
tags/2.4.2/freemius/require.php (added)
-
tags/2.4.2/freemius/start.php (added)
-
tags/2.4.2/freemius/templates (added)
-
tags/2.4.2/freemius/templates/account (added)
-
tags/2.4.2/freemius/templates/account.php (added)
-
tags/2.4.2/freemius/templates/account/billing.php (added)
-
tags/2.4.2/freemius/templates/account/index.php (added)
-
tags/2.4.2/freemius/templates/account/partials (added)
-
tags/2.4.2/freemius/templates/account/partials/activate-license-button.php (added)
-
tags/2.4.2/freemius/templates/account/partials/addon.php (added)
-
tags/2.4.2/freemius/templates/account/partials/deactivate-license-button.php (added)
-
tags/2.4.2/freemius/templates/account/partials/disconnect-button.php (added)
-
tags/2.4.2/freemius/templates/account/partials/index.php (added)
-
tags/2.4.2/freemius/templates/account/partials/site.php (added)
-
tags/2.4.2/freemius/templates/account/payments.php (added)
-
tags/2.4.2/freemius/templates/add-ons.php (added)
-
tags/2.4.2/freemius/templates/add-trial-to-pricing.php (added)
-
tags/2.4.2/freemius/templates/admin-notice.php (added)
-
tags/2.4.2/freemius/templates/ajax-loader.php (added)
-
tags/2.4.2/freemius/templates/api-connectivity-message-js.php (added)
-
tags/2.4.2/freemius/templates/auto-installation.php (added)
-
tags/2.4.2/freemius/templates/checkout.php (added)
-
tags/2.4.2/freemius/templates/clone-resolution-js.php (added)
-
tags/2.4.2/freemius/templates/connect (added)
-
tags/2.4.2/freemius/templates/connect.php (added)
-
tags/2.4.2/freemius/templates/connect/index.php (added)
-
tags/2.4.2/freemius/templates/connect/permission.php (added)
-
tags/2.4.2/freemius/templates/connect/permissions-group.php (added)
-
tags/2.4.2/freemius/templates/contact.php (added)
-
tags/2.4.2/freemius/templates/debug (added)
-
tags/2.4.2/freemius/templates/debug.php (added)
-
tags/2.4.2/freemius/templates/debug/api-calls.php (added)
-
tags/2.4.2/freemius/templates/debug/index.php (added)
-
tags/2.4.2/freemius/templates/debug/logger.php (added)
-
tags/2.4.2/freemius/templates/debug/plugins-themes-sync.php (added)
-
tags/2.4.2/freemius/templates/debug/scheduled-crons.php (added)
-
tags/2.4.2/freemius/templates/email.php (added)
-
tags/2.4.2/freemius/templates/forms (added)
-
tags/2.4.2/freemius/templates/forms/affiliation.php (added)
-
tags/2.4.2/freemius/templates/forms/data-debug-mode.php (added)
-
tags/2.4.2/freemius/templates/forms/deactivation (added)
-
tags/2.4.2/freemius/templates/forms/deactivation/contact.php (added)
-
tags/2.4.2/freemius/templates/forms/deactivation/form.php (added)
-
tags/2.4.2/freemius/templates/forms/deactivation/index.php (added)
-
tags/2.4.2/freemius/templates/forms/deactivation/retry-skip.php (added)
-
tags/2.4.2/freemius/templates/forms/email-address-update.php (added)
-
tags/2.4.2/freemius/templates/forms/index.php (added)
-
tags/2.4.2/freemius/templates/forms/license-activation.php (added)
-
tags/2.4.2/freemius/templates/forms/optout.php (added)
-
tags/2.4.2/freemius/templates/forms/premium-versions-upgrade-handler.php (added)
-
tags/2.4.2/freemius/templates/forms/premium-versions-upgrade-metadata.php (added)
-
tags/2.4.2/freemius/templates/forms/resend-key.php (added)
-
tags/2.4.2/freemius/templates/forms/subscription-cancellation.php (added)
-
tags/2.4.2/freemius/templates/forms/trial-start.php (added)
-
tags/2.4.2/freemius/templates/forms/user-change.php (added)
-
tags/2.4.2/freemius/templates/gdpr-optin-js.php (added)
-
tags/2.4.2/freemius/templates/index.php (added)
-
tags/2.4.2/freemius/templates/js (added)
-
tags/2.4.2/freemius/templates/js/index.php (added)
-
tags/2.4.2/freemius/templates/js/jquery.content-change.php (added)
-
tags/2.4.2/freemius/templates/js/open-license-activation.php (added)
-
tags/2.4.2/freemius/templates/js/permissions.php (added)
-
tags/2.4.2/freemius/templates/js/style-premium-theme.php (added)
-
tags/2.4.2/freemius/templates/partials (added)
-
tags/2.4.2/freemius/templates/partials/index.php (added)
-
tags/2.4.2/freemius/templates/partials/network-activation.php (added)
-
tags/2.4.2/freemius/templates/plugin-icon.php (added)
-
tags/2.4.2/freemius/templates/plugin-info (added)
-
tags/2.4.2/freemius/templates/plugin-info/description.php (added)
-
tags/2.4.2/freemius/templates/plugin-info/features.php (added)
-
tags/2.4.2/freemius/templates/plugin-info/index.php (added)
-
tags/2.4.2/freemius/templates/plugin-info/screenshots.php (added)
-
tags/2.4.2/freemius/templates/powered-by.php (added)
-
tags/2.4.2/freemius/templates/pricing.php (added)
-
tags/2.4.2/freemius/templates/secure-https-header.php (added)
-
tags/2.4.2/freemius/templates/sticky-admin-notice-js.php (added)
-
tags/2.4.2/freemius/templates/tabs-capture-js.php (added)
-
tags/2.4.2/freemius/templates/tabs.php (added)
-
tags/2.4.2/img (added)
-
tags/2.4.2/img/attention.png (added)
-
tags/2.4.2/img/close-icon.png (added)
-
tags/2.4.2/img/cross-flat.png (added)
-
tags/2.4.2/img/help.png (added)
-
tags/2.4.2/inc (added)
-
tags/2.4.2/inc/quick_bulk_edit_patch.php (added)
-
tags/2.4.2/inc/settings.php (added)
-
tags/2.4.2/js (added)
-
tags/2.4.2/js/dd_horizontal_tabs.js (added)
-
tags/2.4.2/js/setting.js (added)
-
tags/2.4.2/readme.txt (added)
-
tags/2.4.2/woocommerce-product-shippings.php (added)
-
trunk/inc/settings.php (modified) (23 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/woocommerce-product-shippings.php (modified) (33 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-shipping-gateway-per-product/trunk/inc/settings.php
r3062774 r3083378 1 1 <?php 2 2 3 function softsdev_product_shippings_settings() 4 { 3 function softsdev_product_shippings_settings() { 5 4 wp_register_script( 'dd_horztab_script', plugins_url( '/js/dd_horizontal_tabs.js', DFM_SGPPFW__FILE__ ) ); 6 5 wp_enqueue_script( 'dd_horztab_script' ); … … 8 7 add_filter( 'update_footer', 'softsdev_product_shippings_update_footer' ); 9 8 $setting_url = get_bloginfo( 'url' ) . '/wp-admin/admin.php?page=softsdev-product-shippings'; 9 $softsdev_wps_plugin_settings = get_option( 'sdwps_plugin_settings', array( 10 'default_option_mp' => 'expensive', 11 ) ); 12 $default_option_mp = $softsdev_wps_plugin_settings['default_option_mp']; 10 13 ?> 11 14 <div class="wrap wrap-mc-paid fs-section dd-wc-product-shippings"><div id="icon-tools" class="icon32"></div> 12 15 <h2 class="nav-tab-wrapper" id="settings"> 13 16 <a href="<?php 14 echo $setting_url;17 echo $setting_url; 15 18 ?>" class="nav-tab fs-tab nav-tab-active home">Settings</a> 16 19 </h2> 17 20 <h2 class="title"><?php 18 echo __( 'Woocommerce Product Shippings', 'softsdev' );21 echo __( 'Woocommerce Product Shippings', 'softsdev' ); 19 22 ?></h2></div> 20 23 <div class="left-dd-paid "> … … 51 54 ?>> 52 55 <a href="<?php 53 echo admin_url( 'admin.php?page=softsdev-product-shippings-contact' );56 echo admin_url( 'admin.php?page=softsdev-product-shippings-contact' ); 54 57 ?>">Support</a> 55 58 </li> … … 69 72 add_filter( 'admin_footer_text', 'softsdev_product_shippings_footer_text' ); 70 73 add_filter( 'update_footer', 'softsdev_product_shippings_update_footer' ); 71 echo '<div class="wrap wrap-mc-paid"><div id="icon-tools" class="icon32"></div>';72 echo '<h2 class="title">' . __( 'Woocommerce Product Shippings - Information', 'softsdev' ) . '</h2></div>';74 echo '<div class="wrap wrap-mc-paid"><div id="icon-tools" class="icon32"></div>'; 75 echo '<h2 class="title">' . __( 'Woocommerce Product Shippings - Information', 'softsdev' ) . '</h2></div>'; 73 76 ?> 74 77 <p>This plugin for woocommerce lets you select the available shipping gateways for each individual product. … … 78 81 <p>This plugin allows you to improve your customer service by giving the best shipping service for your customers.</p> 79 82 <img src="<?php 80 echo plugins_url( 'img/attention.png', DFM_SGPPFW__FILE__ );83 echo plugins_url( 'img/attention.png', DFM_SGPPFW__FILE__ ); 81 84 ?>"><br> 82 85 IMPORTANT: We are using a new license system. If you have trouble with your license then see this link:<br> 83 <a href="https:// dreamfoxmedia.freshdesk.com/support/solutions/articles/72000533747-transferring-our-licenses-from-dreamfoxmedia-to-freemius/" target="_blank">Click here to see the complete article</a>86 <a href="https://support.dreamfoxmedia.com/kb/article/5/transferring-our-licenses-from-dreamfoxmedia-to-freemius" target="_blank">Click here to see the complete article</a> 84 87 85 88 </div> … … 93 96 add_filter( 'admin_footer_text', 'softsdev_product_shippings_footer_text' ); 94 97 add_filter( 'update_footer', 'softsdev_product_shippings_update_footer' ); 95 echo '<div class="wrap wrap-mc-paid"><div id="icon-tools" class="icon32"></div>';96 echo '<h2 class="title">' . __( 'Woocommerce Product Shippings - Settings', 'softsdev' ) . '</h2></div>';98 echo '<div class="wrap wrap-mc-paid"><div id="icon-tools" class="icon32"></div>'; 99 echo '<h2 class="title">' . __( 'Woocommerce Product Shippings - Settings', 'softsdev' ) . '</h2></div>'; 97 100 ?> 98 101 <div id="freeversion"> … … 100 103 <div> 101 104 <h3 class="hndle"><?php 102 echo __( 'Multiple products in cart with different shipping gateway', 'softsdev' );105 echo __( 'Multiple products in cart with different shipping gateway', 'softsdev' ); 103 106 ?></h3> 104 107 <select id="sdwps_default_payment" name="sdwps_setting[default_option_mp]" disabled="disabled"> … … 122 125 <br /> 123 126 <small><?php 124 echo __( 'In case of multiple products from diffrent shipping', 'softsdev' );127 echo __( 'In case of multiple products from diffrent shipping', 'softsdev' ); 125 128 ?></small> 126 129 </div> … … 139 142 add_filter( 'admin_footer_text', 'softsdev_product_shippings_footer_text' ); 140 143 add_filter( 'update_footer', 'softsdev_product_shippings_update_footer' ); 141 echo '<div class="wrap wrap-mc-paid"><div id="icon-tools" class="icon32"></div>';142 echo '<h2 class="title">' . __( 'Woocommerce Product Shippings - Newsletter', 'softsdev' ) . '</h2></div>';144 echo '<div class="wrap wrap-mc-paid"><div id="icon-tools" class="icon32"></div>'; 145 echo '<h2 class="title">' . __( 'Woocommerce Product Shippings - Newsletter', 'softsdev' ) . '</h2></div>'; 143 146 ?> 144 147 <!-- Begin SendInBlue Form --> … … 150 153 add_filter( 'admin_footer_text', 'softsdev_product_shippings_footer_text' ); 151 154 add_filter( 'update_footer', 'softsdev_product_shippings_update_footer' ); 152 echo '<div class="wrap wrap-mc-paid"><div id="icon-tools" class="icon32"></div>';153 echo '<h2 class="title">' . __( 'Woocommerce Product Shippings - FAQ', 'softsdev' ) . '</h2></div>';155 echo '<div class="wrap wrap-mc-paid"><div id="icon-tools" class="icon32"></div>'; 156 echo '<h2 class="title">' . __( 'Woocommerce Product Shippings - FAQ', 'softsdev' ) . '</h2></div>'; 154 157 ?> 155 158 <div> 156 159 <!-- Begin freshdeskForm --> 157 If you want to read the FAQ about this plugin then click on below link. We will take you right there in a breeze.<br>You can also click on the help button in the bottom right corner to see the most ask questions. 160 If you want to read the FAQ about this plugin then click on below link. We will take you right there in a breeze.<br> 161 You can also click on the help button in the bottom right corner to see the most ask questions. 158 162 <script> 159 163 window.fwSettings = { … … 170 174 </script> 171 175 <script type='text/javascript' src='https://widget.freshworks.com/widgets/72000002383.js' async defer></script> 172 <a href="https://dreamfoxmedia.freshdesk.com/support/solutions/72000275599/" target="_blank">Click here to see the Shipping Plugin FAQ</a> 176 <a href="https://support.dreamfoxmedia.com/kb/section/8" target="_blank">Click here to see the Shipping Plugin FAQ</a> 177 178 <p><?php 179 echo sprintf( __( 'If your answer can not be found in the resources listed above, please use our supportsystem <a href="%s">here</a>.' ), 'https://support.dreamfoxmedia.com' ); 180 ?></p> 181 <p>Found a bug? Please open an issue <a href="https://support.dreamfoxmedia.com/support/tickets/create" target="_blank">here.</a></p> 173 182 <!-- END - We recommend to place the above code in head tag of your website html --> 174 183 </div> … … 179 188 add_filter( 'admin_footer_text', 'softsdev_product_shippings_footer_text' ); 180 189 add_filter( 'update_footer', 'softsdev_product_shippings_update_footer' ); 181 echo '<div class="wrap wrap-mc-paid"><div id="icon-tools" class="icon32"></div>';182 echo '<h2 class="title">' . __( 'Woocommerce Product Shippings - Dreamfox Media Plugins', 'softsdev' ) . '</h2></div>';190 echo '<div class="wrap wrap-mc-paid"><div id="icon-tools" class="icon32"></div>'; 191 echo '<h2 class="title">' . __( 'Woocommerce Product Shippings - Dreamfox Media Plugins', 'softsdev' ) . '</h2></div>'; 183 192 ?> 184 193 <?php … … 187 196 $response_code = wp_remote_retrieve_response_code( $response ); 188 197 $response_body = wp_remote_retrieve_body( $response ); 189 190 198 if ( $response_code != 200 || is_wp_error( $response ) ) { 191 echo '<div class="error below-h2"><p>There was an error retrieving the list from the server.</p></div>';199 echo '<div class="error below-h2"><p>There was an error retrieving the list from the server.</p></div>'; 192 200 switch ( $response_code ) { 193 201 case '403': 194 echo '<div class="error below-h2"><p>Seems your host is blocking <strong>' . dirname( $url ) . '</strong>. Please request to white list this domain </p></div>';202 echo '<div class="error below-h2"><p>Seems your host is blocking <strong>' . dirname( $url ) . '</strong>. Please request to white list this domain </p></div>'; 195 203 break; 196 204 } 197 205 wp_die(); 198 206 } 199 200 207 $addons = json_decode( $response_body ); 201 208 ?> … … 203 210 <h3>Here you see our great Free and Premium Plugins of Dreamfox Media</h3> 204 211 <link href="<?php 205 echo plugins_url( '/css/addons-style.min.css', DFM_SGPPFW__FILE__ );212 echo plugins_url( '/css/addons-style.min.css', DFM_SGPPFW__FILE__ ); 206 213 ?>" rel="stylesheet" type="text/css"> 207 214 <ul class="addons-wrap"> 208 215 <?php 209 216 foreach ( $addons as $addon ) { 210 if ( !empty( $addon->hidden) ) {217 if ( !empty( $addon->hidden ) ) { 211 218 continue; 212 219 } … … 218 225 ?> 219 226 <li class="mymail-addon <?php 220 if ( !empty($addon->is_free) ) { 221 echo ' is-free' ; 222 } 223 if ( !empty($addon->is_feature) ) { 224 echo ' is-feature' ; 225 } 226 227 if ( !empty( $addon->is_free ) ) { 228 echo ' is-free'; 229 } 230 if ( !empty( $addon->is_feature ) ) { 231 echo ' is-feature'; 232 } 227 233 if ( isset( $addon->image ) ) { 228 234 $image = str_replace( 'http//', '//', $addon->image ); … … 230 236 $image = str_replace( 'http//', '//', $addon->image_ ); 231 237 } 232 233 238 ?>"> 234 239 <div class="bgimage" style="min-height: 500px; background-repeat: no-repeat; background-image:url(<?php 235 echo $image;240 echo $image; 236 241 ?>)"> 237 242 <?php 238 239 243 if ( isset( $addon->wpslug ) ) { 240 244 ?> 241 245 <a href="plugin-install.php?tab=plugin-information&plugin=<?php 242 echo dirname( $addon->wpslug );246 echo dirname( $addon->wpslug ); 243 247 ?>&from=import&TB_iframe=true&width=745&height=745" class="thickbox"> </a> 244 248 <?php … … 246 250 ?> 247 251 <a href="<?php 248 echo $addon->link;252 echo $addon->link; 249 253 ?>"> </a> 250 254 <?php 251 255 } 252 253 256 ?> 254 257 </div> 255 258 <h4><?php 256 echo $addon->name;259 echo $addon->name; 257 260 ?></h4> 258 261 <p class="author">by 259 262 <?php 260 261 263 if ( $addon->author_url ) { 262 echo '<a href="' . $addon->author_url . '">' . $addon->author . '</a>';264 echo '<a href="' . $addon->author_url . '">' . $addon->author . '</a>'; 263 265 } else { 264 echo $addon->author ; 265 } 266 266 echo $addon->author; 267 } 267 268 ?> 268 269 </p> 269 270 <p class="description"><?php 270 echo $addon->description;271 echo $addon->description; 271 272 ?></p> 272 273 <div class="action-links"> 273 274 <?php 274 275 if ( !empty($addon->wpslug) ) { 275 if ( !empty( $addon->wpslug ) ) { 276 276 ?> 277 277 <?php 278 279 278 if ( is_dir( dirname( WP_PLUGIN_DIR . '/' . $addon->wpslug ) ) ) { 280 279 ?> 281 280 <?php 282 283 281 if ( is_plugin_active( $addon->wpslug ) ) { 284 282 ?> 285 283 <a class="button" href="<?php 286 echo wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $addon->wpslug, 'deactivate-plugin_' . $addon->wpslug );284 echo wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $addon->wpslug, 'deactivate-plugin_' . $addon->wpslug ); 287 285 ?>"><?php 288 286 _e( 'Deactivate', 'mymail' ); … … 292 290 ?> 293 291 <a class="button" href="<?php 294 echo wp_nonce_url( 'plugins.php?action=activate&plugin=' . $addon->wpslug, 'activate-plugin_' . $addon->wpslug );292 echo wp_nonce_url( 'plugins.php?action=activate&plugin=' . $addon->wpslug, 'activate-plugin_' . $addon->wpslug ); 295 293 ?>"><?php 296 294 _e( 'Activate', 'mymail' ); … … 298 296 <?php 299 297 } 300 301 298 ?> 302 299 <?php … … 304 301 ?> 305 302 <?php 306 307 303 if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) { 308 304 ?> 309 305 <a class="button button-primary" href="<?php 310 echo wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . dirname( $addon->wpslug ) . '&mymail-addon' ), 'install-plugin_' . dirname( $addon->wpslug ) );306 echo wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . dirname( $addon->wpslug ) . '&mymail-addon' ), 'install-plugin_' . dirname( $addon->wpslug ) ); 311 307 ?>"><?php 312 308 _e( 'Install', 'mymail' ); … … 314 310 <?php 315 311 } 316 317 312 ?> 318 313 <?php 319 314 } 320 321 315 ?> 322 316 <?php … … 324 318 ?> 325 319 <a class="button button-primary" href="<?php 326 echo $addon->link;320 echo $addon->link; 327 321 ?>"><?php 328 322 _e( 'Purchase', 'mymail' ); … … 330 324 <?php 331 325 } 332 333 326 ?> 334 327 </div> -
woocommerce-shipping-gateway-per-product/trunk/readme.txt
r3062774 r3083378 92 92 == Changelog == 93 93 94 = 2.4.2 = 95 * Bug fixed add to cart 96 94 97 = 2.4.1 = 95 98 * tested with latest woocommerce -
woocommerce-shipping-gateway-per-product/trunk/woocommerce-product-shippings.php
r3062774 r3083378 5 5 * Plugin URI: https://www.dreamfoxmedia.com 6 6 * Description: WooCommerce Shipping gateway per Product 7 * Version: 2.4. 17 * Version: 2.4.2 8 8 * Author: Dreamfox 9 9 * Author URI: https://www.dreamfoxmedia.com … … 27 27 } 28 28 } ); 29 30 29 if ( function_exists( 'dfm_sgppfw_fs' ) ) { 31 30 dfm_sgppfw_fs()->set_basename( false, __FILE__ ); 32 31 } else { 33 34 32 if ( !function_exists( 'dfm_sgppfw_fs' ) ) { 35 33 // Create a helper function for easy SDK access. 36 function dfm_sgppfw_fs() 37 { 38 global $dfm_sgppfw_fs ; 39 34 function dfm_sgppfw_fs() { 35 global $dfm_sgppfw_fs; 40 36 if ( !isset( $dfm_sgppfw_fs ) ) { 41 37 // Activate multisite network integration. … … 57 53 'has_paid_plans' => true, 58 54 'menu' => array( 59 'slug' => 'softsdev-product-shippings',60 'support' => false,61 'parent' => array(62 'slug' => 'woocommerce',63 ),64 ),55 'slug' => 'softsdev-product-shippings', 56 'support' => false, 57 'parent' => array( 58 'slug' => 'woocommerce', 59 ), 60 ), 65 61 'is_live' => true, 66 62 ) ); 67 63 } 68 69 64 return $dfm_sgppfw_fs; 70 65 } 71 66 72 67 // Init Freemius. 73 68 dfm_sgppfw_fs(); … … 75 70 do_action( 'dfm_sgppfw_fs_loaded' ); 76 71 } 77 78 } 79 72 } 80 73 if ( !function_exists( 'is_plugin_active_for_network' ) || !function_exists( 'is_plugin_active' ) ) { 81 74 require_once ABSPATH . '/wp-admin/includes/plugin.php'; … … 97 90 } 98 91 dfm_sgppfw_fs()->add_filter( 'hide_account_tabs', 'dfm_sgppfw_hide_account_tabs' ); 99 function dfm_sgppfw_hide_account_tabs() 100 { 92 function dfm_sgppfw_hide_account_tabs() { 101 93 return true; 102 94 } … … 105 97 * Check if WooCommerce is active 106 98 */ 107 108 99 if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && !function_exists( 'softsdev_product_shippings_settings' ) || is_plugin_active_for_network( 'woocommerce/woocommerce.php' ) ) { 109 100 require_once dirname( __FILE__ ) . '/inc/settings.php'; 110 function softsdev_remove_empty_items( $ships ) 111 { 112 101 function softsdev_remove_empty_items( $ships ) { 113 102 if ( is_array( $ships ) ) { 114 103 $result = array(); 115 104 foreach ( $ships as $ship ) { 116 if ( strlen( trim( $ship ) ) > 0 ) {105 if ( is_string( $ship ) && strlen( trim( $ship ) ) > 0 ) { 117 106 $result[] = $ship; 118 107 } … … 121 110 $result = $ships; 122 111 } 123 124 112 return $result; 125 113 } 126 114 127 115 // display default admin notice 128 function product_shipping_ignore_notice() 129 { 116 function product_shipping_ignore_notice() { 130 117 if ( isset( $_GET['product-shipping-ignore-notice'] ) ) { 131 118 update_option( 'product_shipping_alert', 1 ); 132 119 } 133 120 } 134 121 135 122 add_action( 'admin_init', 'product_shipping_ignore_notice' ); 136 123 // Submenu on woocommerce section … … 140 127 */ 141 128 if ( !function_exists( 'softsdev_notice' ) ) { 142 function softsdev_notice( $message, $type ) 143 { 129 function softsdev_notice( $message, $type ) { 144 130 ?> 145 131 <div class="<?php 146 echo $type;132 echo $type; 147 133 ?> notice"> 148 134 <p><?php 149 echo $message;135 echo $message; 150 136 ?></p> 151 137 </div> 152 138 <?php 153 139 } 154 140 155 141 } 156 142 /** … … 159 145 * @return string 160 146 */ 161 function softsdev_product_shippings_footer_text( $text ) 162 { 147 function softsdev_product_shippings_footer_text( $text ) { 163 148 if ( isset( $_GET['page'] ) && strpos( plugin_basename( wp_unslash( $_GET['page'] ) ), 'softsdev-product-shippings' ) === 0 ) { 164 149 $text = '<a href="https://www.dreamfoxmedia.com" target="_blank">www.dreamfoxmedia.com</a>'; … … 166 151 return $text; 167 152 } 168 153 169 154 /** 170 155 * … … 172 157 * @return string 173 158 */ 174 function softsdev_product_shippings_update_footer( $text ) 175 { 159 function softsdev_product_shippings_update_footer( $text ) { 176 160 if ( isset( $_GET['page'] ) && strpos( plugin_basename( wp_unslash( $_GET['page'] ) ), 'softsdev-product-shippings' ) === 0 ) { 177 161 $text = 'Version 2.4.1'; … … 179 163 return $text; 180 164 } 181 165 182 166 add_action( 'add_meta_boxes', 'wps_ship_meta_box_add', 50 ); 183 function wps_ship_meta_box_add() 184 { 167 function wps_ship_meta_box_add() { 185 168 add_meta_box( 186 169 'shippings', … … 192 175 ); 193 176 } 194 177 195 178 if ( !function_exists( 'wps_shipping_get_shippings_meta' ) ) { 196 function wps_shipping_get_shippings_meta( $product_id ) 197 { 179 function wps_shipping_get_shippings_meta( $product_id ) { 198 180 $shippings = get_post_meta( $product_id, 'shippings', true ); 199 181 if ( !is_array( $shippings ) ) { … … 202 184 return $shippings; 203 185 } 204 186 205 187 } 206 188 /** … … 209 191 * @global type $woocommerce 210 192 */ 211 function wps_shipping_form() 212 { 213 global $post, $woocommerce ; 193 function wps_shipping_form() { 194 global $post, $woocommerce; 214 195 $productIds = get_option( 'woocommerce_product_apply_ship', array() ); 215 196 $postshippings = wps_shipping_get_shippings_meta( $post->ID ); 216 217 197 if ( is_array( $productIds ) ) { 218 198 foreach ( $productIds as $key => $product ) { 219 199 $shippings = wps_shipping_get_shippings_meta( $product ); 220 200 if ( !get_post( $product ) || $shippings && !count( $shippings ) ) { 221 unset( $productIds[$key]);201 unset($productIds[$key]); 222 202 } 223 203 } 224 204 $shippings = apply_filters( 'softsdev_shipping_method', $shippings ); 225 205 } 226 227 206 update_option( 'woocommerce_product_apply_ship', $productIds ); 228 207 $shipping_methods = $woocommerce->shipping->load_shipping_methods(); … … 235 214 } 236 215 foreach ( $shippings as $ship ) { 237 238 216 if ( $ship->enabled === 'yes' ) { 239 217 $checked = ''; … … 243 221 ?> 244 222 <input type="checkbox" <?php 245 echo $checked;223 echo $checked; 246 224 ?> value="<?php 247 echo $ship->id;225 echo $ship->id; 248 226 ?>" name="ship[]" id="ship_<?php 249 echo $ship->id;227 echo $ship->id; 250 228 ?>" /> 251 229 <label for="ship_<?php 252 echo $ship->id;230 echo $ship->id; 253 231 ?>"><?php 254 echo $ship->method_title;232 echo $ship->method_title; 255 233 ?></label> 256 234 <br /> 257 235 <?php 258 236 } 259 260 } 261 } 262 237 } 238 } 239 263 240 add_action( 264 241 'save_post', … … 273 250 * @return type 274 251 */ 275 function wps_ship_meta_box_save( $post_id, $post ) 276 { 252 function wps_ship_meta_box_save( $post_id, $post ) { 277 253 // Restrict to save for autosave 278 254 if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE || isset( $_REQUEST['action'] ) && sanitize_title( $_REQUEST['action'] ) != 'editpost' ) { … … 284 260 } 285 261 delete_post_meta( $post_id, 'shippings' ); 286 287 262 if ( get_post_type() === 'product' && isset( $_POST['ship'] ) ) { 288 263 $productIds = get_option( 'woocommerce_product_apply_ship' ); 289 290 264 if ( is_array( $productIds ) && !in_array( $post_id, $productIds ) ) { 291 265 $productIds[] = $post_id; 292 266 update_option( 'woocommerce_product_apply_ship', $productIds ); 293 267 } 294 295 268 //delete_post_meta($post_id, 'shippings'); 296 269 $shippings = array(); … … 301 274 } 302 275 } 303 304 276 if ( count( $shippings ) ) { 305 277 update_post_meta( $post_id, 'shippings', $shippings ); … … 307 279 delete_post_meta( $post_id, 'shippings' ); 308 280 } 309 310 } 311 312 } 313 281 } 282 } 283 314 284 /** 315 285 * … … 324 294 * @return type 325 295 */ 326 function wps_shipping_method_disable_country( $packages ) 327 { 296 function wps_shipping_method_disable_country( $packages ) { 328 297 foreach ( $packages as &$package ) { 329 298 $items = $package['contents']; … … 334 303 ) ); 335 304 if ( is_array( $items ) ) { 336 337 305 if ( $softsdev_wps_plugin_settings['default_option_mp'] == 'common_only' ) { 338 306 foreach ( $items as $item ) { 339 307 $itemsShips = get_post_meta( $item['product_id'], 'shippings', true ); 340 341 308 if ( is_string( $itemsShips ) ) { 342 309 $ships[] = $itemsShips; … … 344 311 $ships[] = array_values( $itemsShips ); 345 312 } 346 347 313 } 348 314 $ships = softsdev_remove_empty_items( $ships ); 349 350 315 if ( count( $ships ) > 1 ) { 351 316 $ships_temp = $ships[0]; 352 for ( $i = 1 ; $i < count( $ships ) ; $i++) {317 for ($i = 1; $i < count( $ships ); $i++) { 353 318 $ships_temp = array_intersect( $ships_temp, $ships[$i] ); 354 319 } 355 320 $ships = $ships_temp; 356 321 } 357 358 322 } else { 359 323 foreach ( $items as $item ) { 360 324 $itemsShips = get_post_meta( $item['product_id'], 'shippings', true ); 361 362 325 if ( is_string( $itemsShips ) ) { 363 326 $ships[] = $itemsShips; … … 365 328 $ships = array_merge( $ships, $itemsShips ); 366 329 } 367 368 330 $ships = softsdev_remove_empty_items( $ships ); 369 331 } 370 332 } 371 372 333 } 373 334 // echo '<pre>'; var_dump($ships); echo '</pre>'; 374 375 335 if ( count( $ships ) > 0 ) { 376 336 $available_methods =& $package['rates']; … … 383 343 foreach ( $available_methods as $key => $shipping ) { 384 344 if ( !in_array( $shipping->method_id, $filtered_ship ) ) { 385 unset( $available_methods[$key]);345 unset($available_methods[$key]); 386 346 } 387 347 } … … 393 353 // 'default_option_mp' => 'expensive', 394 354 // ) ); 395 396 355 if ( count( $available_methods ) > 0 && count( $ships ) > 1 && $softsdev_wps_plugin_settings['default_option_mp'] != 'let_customer_decide' && $softsdev_wps_plugin_settings['default_option_mp'] != 'common_only' ) { 397 356 #if common ship not found … … 420 379 foreach ( $available_methods as $_key => $_shipping ) { 421 380 if ( !in_array( $_key, $aplicable_shipping ) ) { 422 unset( $available_methods[$_key]);381 unset($available_methods[$_key]); 423 382 } 424 383 } 425 384 } 426 427 } 428 385 } 429 386 } 430 387 return $packages; 431 388 } 432 389 433 390 // update new filter as depricated woocommerce_available_shipping_methods 434 391 add_filter( 'woocommerce_shipping_packages', 'wps_shipping_method_disable_country', 99 ); … … 439 396 * 440 397 */ 441 function update_user_database() 442 { 398 function update_user_database() { 443 399 $is_shipping_updated = get_option( 'is_shipping_updated' ); 444 445 400 if ( !$is_shipping_updated ) { 446 401 $args = array( … … 452 407 foreach ( $products as $pro_id ) { 453 408 $itemsShips = wps_shipping_get_shippings_meta( $pro_id ); 454 if ( empty( $itemsShips) ) {409 if ( empty( $itemsShips ) ) { 455 410 delete_post_meta( $pro_id, 'shippings' ); 456 411 } … … 458 413 update_option( 'is_shipping_updated', true ); 459 414 } 460 461 } 462 415 } 416 463 417 add_action( 'wp_head', 'update_user_database' ); 464 418 add_action( 'admin_menu', 'softsdev_product_shippings_submenu_page' ); 465 function softsdev_product_shippings_submenu_page() 466 { 419 function softsdev_product_shippings_submenu_page() { 467 420 add_submenu_page( 468 421 'woocommerce', … … 474 427 ); 475 428 } 476 477 function softsdev_product_shippings_enqueue() 478 { 429 430 function softsdev_product_shippings_enqueue() { 479 431 wp_enqueue_style( 'softsdev_product_shippings_enqueue', plugin_dir_url( __FILE__ ) . '/css/style.css' ); 480 wp_register_script( 'softsdev_product_shippings_setting_script', plugins_url( '/js/setting.js', __FILE__ ), array( 'jquery') );432 wp_register_script( 'softsdev_product_shippings_setting_script', plugins_url( '/js/setting.js', __FILE__ ), array('jquery') ); 481 433 wp_enqueue_script( 'softsdev_product_shippings_setting_script' ); 482 434 $data_to_pass = array( … … 485 437 wp_localize_script( 'softsdev_product_shippings_setting_script', 'dd_settings_data', $data_to_pass ); 486 438 } 487 439 488 440 add_action( 'admin_enqueue_scripts', 'softsdev_product_shippings_enqueue' ); 489 441 }
Note: See TracChangeset
for help on using the changeset viewer.