Version Description
(2020-05-23) = * Fix: Skroutz template items wrapper and availability issue fixed. * Added: Dashboard widget.
Download this release
Release Info
Developer | wahid0003 |
Plugin | CTX Feed – WooCommerce Product Feed Manager Plugin |
Version | 3.5.6 |
Comparing to | |
See all releases |
Code changes from version 3.5.5 to 3.5.6
- README.txt +5 -1
- admin/partials/templates/skroutz.txt +2 -0
- includes/class-woo-feed.php +3 -1
- includes/feeds/merchant_templates.php +1 -1
- includes/feeds/merchant_templates_override.php +47 -0
- includes/widget.php +69 -0
- woo-feed.php +3 -21
README.txt
CHANGED
@@ -5,7 +5,7 @@ Tags:product feed,woocommerce product feed,google shopping feed,google shopping,
|
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.4
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 3.5.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -305,6 +305,10 @@ Using pro version:
|
|
305 |
|
306 |
== Changelog ==
|
307 |
|
|
|
|
|
|
|
|
|
308 |
= 3.5.5 (2020-05-18) =
|
309 |
* Fix: Spartoo.fi Parent/Child attribute value now return child for variation and Parent for other product type instead of woocommerce product type.
|
310 |
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.4
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 3.5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
305 |
|
306 |
== Changelog ==
|
307 |
|
308 |
+
= 3.5.6 (2020-05-23) =
|
309 |
+
* Fix: Skroutz template items wrapper and availability issue fixed.
|
310 |
+
* Added: Dashboard widget.
|
311 |
+
|
312 |
= 3.5.5 (2020-05-18) =
|
313 |
* Fix: Spartoo.fi Parent/Child attribute value now return child for variation and Parent for other product type instead of woocommerce product type.
|
314 |
|
admin/partials/templates/skroutz.txt
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<mywebstore>
|
3 |
<created_at>{DateTimeNow}</created_at>
|
|
|
4 |
{separator}
|
|
|
5 |
</mywebstore>
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<mywebstore>
|
3 |
<created_at>{DateTimeNow}</created_at>
|
4 |
+
<products>
|
5 |
{separator}
|
6 |
+
</products>
|
7 |
</mywebstore>
|
includes/class-woo-feed.php
CHANGED
@@ -177,7 +177,9 @@ class Woo_Feed {
|
|
177 |
require_once WOO_FEED_FREE_PATH . 'admin/class-woo-feed-manage-list.php';
|
178 |
|
179 |
require_once WOO_FEED_FREE_PATH . 'includes/classes/class-woo-feed-sftp.php';
|
180 |
-
|
|
|
|
|
181 |
$this->loader = new Woo_Feed_Loader();
|
182 |
}
|
183 |
|
177 |
require_once WOO_FEED_FREE_PATH . 'admin/class-woo-feed-manage-list.php';
|
178 |
|
179 |
require_once WOO_FEED_FREE_PATH . 'includes/classes/class-woo-feed-sftp.php';
|
180 |
+
require_once WOO_FEED_FREE_PATH . 'includes/widget.php';
|
181 |
+
require_once WOO_FEED_FREE_PATH . 'includes/feeds/merchant_templates_override.php';
|
182 |
+
|
183 |
$this->loader = new Woo_Feed_Loader();
|
184 |
}
|
185 |
|
includes/feeds/merchant_templates.php
CHANGED
@@ -3509,7 +3509,7 @@ return array(
|
|
3509 |
'attributes' => array(
|
3510 |
'id',
|
3511 |
'title',
|
3512 |
-
'
|
3513 |
'link',
|
3514 |
'image',
|
3515 |
'product_type',
|
3509 |
'attributes' => array(
|
3510 |
'id',
|
3511 |
'title',
|
3512 |
+
'description',
|
3513 |
'link',
|
3514 |
'image',
|
3515 |
'product_type',
|
includes/feeds/merchant_templates_override.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: wahid
|
5 |
+
* Date: 5/23/20
|
6 |
+
* Time: 10:07 AM
|
7 |
+
*/
|
8 |
+
################ Spartoo #################
|
9 |
+
/**
|
10 |
+
* Modify Spartoo feed Parent/Child attribute value.
|
11 |
+
*
|
12 |
+
* @param $attribute_value
|
13 |
+
* @param $product
|
14 |
+
* @param $feed_config
|
15 |
+
* @return string
|
16 |
+
*/
|
17 |
+
function woo_feed_spartoo_attribute_value_modify($attribute_value, $product, $feed_config){
|
18 |
+
if('spartoo.fi'===$feed_config['provider'] ){
|
19 |
+
if('variation'===$attribute_value){
|
20 |
+
return "child";
|
21 |
+
}else{
|
22 |
+
return "parent";
|
23 |
+
}
|
24 |
+
}
|
25 |
+
return $attribute_value;
|
26 |
+
}
|
27 |
+
add_filter('woo_feed_get_type_attribute','woo_feed_spartoo_attribute_value_modify',10,3);
|
28 |
+
################ Skroutz #################
|
29 |
+
/**
|
30 |
+
* Rename Skroutz template Availability value with Y or N
|
31 |
+
*
|
32 |
+
* @param $attribute_value
|
33 |
+
* @param $product
|
34 |
+
* @param $feed_config
|
35 |
+
* @return string
|
36 |
+
*/
|
37 |
+
function woo_feed_skroutz_attribute_value_modify($attribute_value, $product, $feed_config){
|
38 |
+
if('skroutz'===$feed_config['provider'] ){
|
39 |
+
if('in stock'===$attribute_value){
|
40 |
+
return "Y";
|
41 |
+
}else{
|
42 |
+
return "N";
|
43 |
+
}
|
44 |
+
}
|
45 |
+
return $attribute_value;
|
46 |
+
}
|
47 |
+
add_filter('woo_feed_get_availability_attribute','woo_feed_skroutz_attribute_value_modify',10,3);
|
includes/widget.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: wahid
|
5 |
+
* Date: 5/22/20
|
6 |
+
* Time: 9:02 PM
|
7 |
+
*/
|
8 |
+
|
9 |
+
|
10 |
+
if(!function_exists('webappick_add_dashboard_widgets')){
|
11 |
+
/**
|
12 |
+
* Add a widget to the dashboard.
|
13 |
+
*
|
14 |
+
* This function is hooked into the 'wp_dashboard_setup' action below.
|
15 |
+
*/
|
16 |
+
function webappick_add_dashboard_widgets() {
|
17 |
+
global $wp_meta_boxes;
|
18 |
+
|
19 |
+
add_meta_box('aaaa_webappick_latest_news_dashboard_widget', __('Latest News from WebAppick Blog', 'woo-feed' ), 'webappick_dashboard_widget_render','dashboard','side','high');
|
20 |
+
|
21 |
+
}
|
22 |
+
add_action( 'wp_dashboard_setup', 'webappick_add_dashboard_widgets',1);
|
23 |
+
}
|
24 |
+
|
25 |
+
if(!function_exists('webappick_dashboard_widget_render')){
|
26 |
+
/**
|
27 |
+
* Function to get dashboard widget data.
|
28 |
+
*/
|
29 |
+
function webappick_dashboard_widget_render() {
|
30 |
+
|
31 |
+
// Initialize variable.
|
32 |
+
$allposts = '';
|
33 |
+
|
34 |
+
// Enter the name of your blog here followed by /wp-json/wp/v2/posts and add filters like this one that limits the result to 2 posts.
|
35 |
+
$response = wp_remote_get( 'https://webappick.com/wp-json/wp/v2/posts?per_page=5' );
|
36 |
+
|
37 |
+
// Exit if error.
|
38 |
+
if ( is_wp_error( $response ) ) {
|
39 |
+
return;
|
40 |
+
}
|
41 |
+
|
42 |
+
// Get the body.
|
43 |
+
$posts = json_decode( wp_remote_retrieve_body( $response ) );
|
44 |
+
|
45 |
+
// Exit if nothing is returned.
|
46 |
+
if ( empty( $posts ) ) {
|
47 |
+
return;
|
48 |
+
}
|
49 |
+
?>
|
50 |
+
<p> <a style="text-decoration: none;font-weight: bold;" href="<?php echo esc_url( 'https://webappick.com' ); ?>" target=_balnk><?php echo esc_html__("WEBAPPICK.COM",'woo-feed'); ?></a></p>
|
51 |
+
<hr>
|
52 |
+
<?php
|
53 |
+
// If there are posts.
|
54 |
+
if ( ! empty( $posts ) ) {
|
55 |
+
// For each post.
|
56 |
+
foreach ( $posts as $post ) {
|
57 |
+
$fordate = date( 'M j, Y', strtotime( $post->modified ) ); ?>
|
58 |
+
<p class="webappick-feeds"> <a style="text-decoration: none;" href="<?php echo esc_url( $post->link ); ?>" target=_balnk><?php echo esc_html( $post->title->rendered ); ?></a> - <?php echo $fordate;?></p>
|
59 |
+
<span><?php echo wp_trim_words( $post->content->rendered, 35, '...'); ?></span>
|
60 |
+
<?php
|
61 |
+
}
|
62 |
+
?>
|
63 |
+
<hr>
|
64 |
+
<p> <a style="text-decoration: none;" href="<?php echo esc_url( 'https://webappick.com/blog/' ); ?>" target=_balnk><?php echo esc_html__("Get more woocommerce tips & news on our blog...",'woo-feed'); ?></a></p>
|
65 |
+
<?php
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
woo-feed.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
* Plugin URI: https://webappick.com/
|
12 |
* Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
|
13 |
*
|
14 |
-
* Version: 3.5.
|
15 |
* Author: WebAppick
|
16 |
* Author URI: https://webappick.com/
|
17 |
* License: GPL v2
|
@@ -39,7 +39,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
|
|
39 |
* @var string
|
40 |
* @since 3.1.6
|
41 |
*/
|
42 |
-
define( 'WOO_FEED_FREE_VERSION', '3.5.
|
43 |
}
|
44 |
|
45 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|
@@ -842,23 +842,5 @@ if ( ! function_exists( 'woo_feed_flash_cache_action' ) ) {
|
|
842 |
add_action('woocommerce_after_add_attribute_fields','woo_feed_flash_cache_action');
|
843 |
add_action('woocommerce_after_edit_attribute_fields','woo_feed_flash_cache_action');
|
844 |
|
845 |
-
|
846 |
-
* Modify Spartoo feed Parent/Child attribute value.
|
847 |
-
*
|
848 |
-
* @param $attribute_value
|
849 |
-
* @param $product
|
850 |
-
* @param $feed_config
|
851 |
-
* @return string
|
852 |
-
*/
|
853 |
-
function woo_feed_spartoo_attribute_value_modify($attribute_value, $product, $feed_config){
|
854 |
-
if('spartoo.fi'===$feed_config['provider'] ){
|
855 |
-
if('variation'===$attribute_value){
|
856 |
-
return "child";
|
857 |
-
}else{
|
858 |
-
return "parent";
|
859 |
-
}
|
860 |
-
}
|
861 |
-
return $attribute_value;
|
862 |
-
}
|
863 |
-
add_filter('woo_feed_get_type_attribute','woo_feed_spartoo_attribute_value_modify',10,3);
|
864 |
// End of file woo-feed.php
|
11 |
* Plugin URI: https://webappick.com/
|
12 |
* Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
|
13 |
*
|
14 |
+
* Version: 3.5.6
|
15 |
* Author: WebAppick
|
16 |
* Author URI: https://webappick.com/
|
17 |
* License: GPL v2
|
39 |
* @var string
|
40 |
* @since 3.1.6
|
41 |
*/
|
42 |
+
define( 'WOO_FEED_FREE_VERSION', '3.5.6' );
|
43 |
}
|
44 |
|
45 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|
842 |
add_action('woocommerce_after_add_attribute_fields','woo_feed_flash_cache_action');
|
843 |
add_action('woocommerce_after_edit_attribute_fields','woo_feed_flash_cache_action');
|
844 |
|
845 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
846 |
// End of file woo-feed.php
|