Version Description
(2021-02-17) = * Added: WP options feature added where wordpress built-in options can be set from the WP Options page and can be found in the product attribute dropdown list. * Added: Product custom attributes in product attribute dropdown list.
Download this release
Release Info
Developer | wahid0003 |
Plugin | CTX Feed – WooCommerce Product Feed Manager Plugin |
Version | 4.3.33 |
Comparing to | |
See all releases |
Code changes from version 4.3.32 to 4.3.33
- README.txt +5 -1
- admin/class-woo-feed-admin.php +3 -1
- admin/class-woo-feed-option-list.php +501 -0
- admin/images/woo-feed-lite.svg +83 -33
- admin/images/woo-feed-pro.svg +84 -31
- admin/partials/woo-feed-add-option.php +25 -0
- admin/partials/woo-feed-option-list.php +45 -0
- includes/class-woo-feed.php +5 -0
- includes/classes/class-woo-feed-dropdown.php +163 -3
- includes/classes/class-woo-feed-engine.php +16 -2
- includes/classes/class-woo-feed-products-v3.php +18 -0
- includes/classes/class-woo-feed-products.php +7 -2
- includes/helper.php +31 -0
- woo-feed.php +2 -2
README.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: Product Feed, WooCommerce, Google Shopping, Google Merchant, Facebook Cata
|
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.6.1
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 4.3.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -498,6 +498,10 @@ Using pro version:
|
|
498 |
|
499 |
== Changelog ==
|
500 |
|
|
|
|
|
|
|
|
|
501 |
= 4.3.32 (2021-02-16) =
|
502 |
* Added: Auto exclude url addition for caching plugins.
|
503 |
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.6.1
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 4.3.33
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
498 |
|
499 |
== Changelog ==
|
500 |
|
501 |
+
= 4.3.33 (2021-02-17) =
|
502 |
+
* Added: WP options feature added where wordpress built-in options can be set from the WP Options page and can be found in the product attribute dropdown list.
|
503 |
+
* Added: Product custom attributes in product attribute dropdown list.
|
504 |
+
|
505 |
= 4.3.32 (2021-02-16) =
|
506 |
* Added: Auto exclude url addition for caching plugins.
|
507 |
|
admin/class-woo-feed-admin.php
CHANGED
@@ -232,7 +232,8 @@ class Woo_Feed_Admin {
|
|
232 |
add_submenu_page( 'webappick-manage-feeds', __( 'Make Feed', 'woo-feed' ), __( 'Make Feed', 'woo-feed' ), 'manage_woocommerce', 'webappick-new-feed', 'woo_feed_generate_new_feed' );
|
233 |
add_submenu_page( 'webappick-manage-feeds', __( 'Category Mapping', 'woo-feed' ), __( 'Category Mapping', 'woo-feed' ), 'manage_woocommerce', 'webappick-feed-category-mapping', 'woo_feed_category_mapping' );
|
234 |
add_submenu_page( 'webappick-manage-feeds', __( 'Settings', 'woo-feed' ), __( 'Settings', 'woo-feed' ), 'manage_woocommerce', 'webappick-feed-settings', 'woo_feed_config_feed' );
|
235 |
-
add_submenu_page( 'webappick-manage-feeds', __( '
|
|
|
236 |
add_submenu_page( 'webappick-manage-feeds', __( 'Documentation', 'woo-feed' ), '<span class="woo-feed-docs">' . __( 'Docs', 'woo-feed' ) . '</span>', 'manage_woocommerce', 'webappick-feed-docs', array( WooFeedDocs::getInstance(), 'woo_feed_docs' ) );
|
237 |
}
|
238 |
}
|
@@ -250,6 +251,7 @@ class Woo_Feed_Admin {
|
|
250 |
'woo_feed_manage_feed' => 'webappick-manage-feeds',
|
251 |
'woo_feed_config_feed' => 'webappick-feed-settings',
|
252 |
'woo_feed_pro_vs_free' => 'webappick-feed-pro-vs-free',
|
|
|
253 |
);
|
254 |
if ( 'admin.php' === $pagenow && isset( $plugin_page ) && ! empty( $plugin_page ) ) {
|
255 |
foreach ( $redirect_to as $from => $to ) {
|
232 |
add_submenu_page( 'webappick-manage-feeds', __( 'Make Feed', 'woo-feed' ), __( 'Make Feed', 'woo-feed' ), 'manage_woocommerce', 'webappick-new-feed', 'woo_feed_generate_new_feed' );
|
233 |
add_submenu_page( 'webappick-manage-feeds', __( 'Category Mapping', 'woo-feed' ), __( 'Category Mapping', 'woo-feed' ), 'manage_woocommerce', 'webappick-feed-category-mapping', 'woo_feed_category_mapping' );
|
234 |
add_submenu_page( 'webappick-manage-feeds', __( 'Settings', 'woo-feed' ), __( 'Settings', 'woo-feed' ), 'manage_woocommerce', 'webappick-feed-settings', 'woo_feed_config_feed' );
|
235 |
+
add_submenu_page( 'webappick-manage-feeds', __( 'WP Options', 'woo-feed' ), __( 'WP Options', 'woo-feed' ), 'manage_woocommerce', 'webappick-wp-options', 'woo_feed_wp_options' );
|
236 |
+
add_submenu_page( 'webappick-manage-feeds', __( 'Status', 'woo-feed' ), __( 'Status', 'woo-feed' ), 'manage_woocommerce', 'webappick-wp-status', 'woo_feed_system_status' );
|
237 |
add_submenu_page( 'webappick-manage-feeds', __( 'Documentation', 'woo-feed' ), '<span class="woo-feed-docs">' . __( 'Docs', 'woo-feed' ) . '</span>', 'manage_woocommerce', 'webappick-feed-docs', array( WooFeedDocs::getInstance(), 'woo_feed_docs' ) );
|
238 |
}
|
239 |
}
|
251 |
'woo_feed_manage_feed' => 'webappick-manage-feeds',
|
252 |
'woo_feed_config_feed' => 'webappick-feed-settings',
|
253 |
'woo_feed_pro_vs_free' => 'webappick-feed-pro-vs-free',
|
254 |
+
'woo_feed_wp_options' => 'webappick-wp-options',
|
255 |
);
|
256 |
if ( 'admin.php' === $pagenow && isset( $plugin_page ) && ! empty( $plugin_page ) ) {
|
257 |
foreach ( $redirect_to as $from => $to ) {
|
admin/class-woo-feed-option-list.php
ADDED
@@ -0,0 +1,501 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php ob_start();
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Category List
|
5 |
+
*
|
6 |
+
* @link https://webappick.com/
|
7 |
+
* @since 1.0.0
|
8 |
+
*
|
9 |
+
* @package Woo_Feed_List_Table
|
10 |
+
* @author Ohidul Islam <wahid@webappick.com>
|
11 |
+
*/
|
12 |
+
class Woo_Feed_Option_list extends Woo_Feed_List_Table {
|
13 |
+
|
14 |
+
/** ************************************************************************
|
15 |
+
* Normally we would be querying data from a database and manipulating that
|
16 |
+
* for use in your list table. For this example, we're going to simplify it
|
17 |
+
* slightly and create a pre-built array. Think of this as the data that might
|
18 |
+
* be returned by $wpdb->query()
|
19 |
+
*
|
20 |
+
* In a real-world scenario, you would make your own custom query inside
|
21 |
+
* this class' prepare_items() method.
|
22 |
+
*
|
23 |
+
* @var array
|
24 |
+
**************************************************************************/
|
25 |
+
|
26 |
+
|
27 |
+
/** ************************************************************************
|
28 |
+
* REQUIRED. Set up a constructor that references the parent constructor. We
|
29 |
+
* use the parent reference to set some default configs.
|
30 |
+
***************************************************************************/
|
31 |
+
function __construct() {
|
32 |
+
// Set parent defaults
|
33 |
+
parent::__construct(
|
34 |
+
array(
|
35 |
+
'singular' => __( 'option', 'woo-feed' ), // singular name of the listed records
|
36 |
+
'plural' => __( 'options', 'woo-feed' ), // plural name of the listed records
|
37 |
+
'ajax' => false, // does this table support ajax?
|
38 |
+
)
|
39 |
+
);
|
40 |
+
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
/** ************************************************************************
|
45 |
+
* Recommended. This method is called when the parent class can't find a method
|
46 |
+
* specifically build for a given column. Generally, it's recommended to include
|
47 |
+
* one method for each column you want to render, keeping your package class
|
48 |
+
* neat and organized. For example, if the class needs to process a column
|
49 |
+
* named 'title', it would first see if a method named $this->column_title()
|
50 |
+
* exists - if it does, that method will be used. If it doesn't, this one will
|
51 |
+
* be used. Generally, you should try to use custom column methods as much as
|
52 |
+
* possible.
|
53 |
+
*
|
54 |
+
* Since we have defined a column_title() method later on, this method doesn't
|
55 |
+
* need to concern itself with any column with a name of 'title'. Instead, it
|
56 |
+
* needs to handle everything else.
|
57 |
+
*
|
58 |
+
* For more detailed insight into how columns are handled, take a look at
|
59 |
+
* WP_List_Table::single_row_columns()
|
60 |
+
*
|
61 |
+
* @param array $item A singular item (one full row's worth of data)
|
62 |
+
* @param array $column_name The name/slug of the column to be processed
|
63 |
+
*
|
64 |
+
* @return string Text or HTML to be placed inside the column <td>
|
65 |
+
**************************************************************************/
|
66 |
+
function column_default( $item, $column_name ) {
|
67 |
+
global $plugin_page;
|
68 |
+
switch ( $column_name ) {
|
69 |
+
case 'option_name':
|
70 |
+
$newName = str_replace( 'wf_option_', '', $item['option_name'] );
|
71 |
+
|
72 |
+
return $newName;
|
73 |
+
case 'option_value':
|
74 |
+
if( isset($item['option_id']) ) {
|
75 |
+
$option_value = get_option($item['option_id']);
|
76 |
+
if( is_array($option_value) ) {
|
77 |
+
$optionValue = implode(', ', $option_value);
|
78 |
+
}else {
|
79 |
+
$optionValue = $option_value;
|
80 |
+
}
|
81 |
+
}else {
|
82 |
+
$optionValue = "";
|
83 |
+
}
|
84 |
+
|
85 |
+
return $optionValue;
|
86 |
+
case 'action':
|
87 |
+
$delete_nonce = wp_create_nonce( 'wf_delete_option' );
|
88 |
+
|
89 |
+
return sprintf(
|
90 |
+
'<a val="?page=%s&action=%s&option=%s&_wpnonce=%s" class="button single-option-delete" style="cursor: pointer;">' . __(
|
91 |
+
'Delete',
|
92 |
+
'woo-feed'
|
93 |
+
) . '</a>',
|
94 |
+
esc_attr( $plugin_page ),
|
95 |
+
'delete-option',
|
96 |
+
$item['option_id'],
|
97 |
+
$delete_nonce
|
98 |
+
);
|
99 |
+
default:
|
100 |
+
return false;
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
|
105 |
+
/** ************************************************************************
|
106 |
+
* Recommended. This is a custom column method and is responsible for what
|
107 |
+
* is rendered in any column with a name/slug of 'title'. Every time the class
|
108 |
+
* needs to render a column, it first looks for a method named
|
109 |
+
* column_{$column_title} - if it exists, that method is run. If it doesn't
|
110 |
+
* exist, column_default() is called instead.
|
111 |
+
*
|
112 |
+
* This example also illustrates how to implement rollover actions. Actions
|
113 |
+
* should be an associative array formatted as 'slug'=>'link html' - and you
|
114 |
+
* will need to generate the URLs yourself. You could even ensure the links
|
115 |
+
*
|
116 |
+
* @param array $item A singular item (one full row's worth of data)
|
117 |
+
*
|
118 |
+
* @return string Text to be placed inside the column <td> (movie title only)
|
119 |
+
* *************************************************************************@see WP_List_Table::::single_row_columns()
|
120 |
+
*/
|
121 |
+
function column_option_name( $item ) {
|
122 |
+
global $plugin_page;
|
123 |
+
$delete_nonce = wp_create_nonce( 'wf_delete_option' );
|
124 |
+
$newName = str_replace( 'wf_option_', '', $item['option_name'] );
|
125 |
+
$title = '<strong>' . $newName . '</strong>';
|
126 |
+
$actions = array(
|
127 |
+
'delete' => sprintf(
|
128 |
+
'<a val="?page=%s&action=%s&option=%s&_wpnonce=%s" class="single-option-delete" style="cursor: pointer;">' . __(
|
129 |
+
'Delete',
|
130 |
+
'woo-feed'
|
131 |
+
) . '</a>',
|
132 |
+
esc_attr( $plugin_page ),
|
133 |
+
'delete-option',
|
134 |
+
$item['option_id'],
|
135 |
+
$delete_nonce
|
136 |
+
),
|
137 |
+
);
|
138 |
+
|
139 |
+
// Return the title contents
|
140 |
+
|
141 |
+
return sprintf(
|
142 |
+
'%1$s <span style="color:silver">(id:%2$s)</span>%3$s',
|
143 |
+
/*$1%s*/
|
144 |
+
$title,
|
145 |
+
/*$2%s*/
|
146 |
+
$item['option_id'],
|
147 |
+
/*$3%s*/
|
148 |
+
$this->row_actions( $actions )
|
149 |
+
);
|
150 |
+
}
|
151 |
+
|
152 |
+
public static function get_mappings() {
|
153 |
+
|
154 |
+
$result = get_option( 'wpfp_option' );
|
155 |
+
|
156 |
+
return ( $result ) ? $result : array();
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Delete a contact record.
|
161 |
+
*
|
162 |
+
* @param int $id customer ID
|
163 |
+
*
|
164 |
+
* @return false|int
|
165 |
+
*/
|
166 |
+
public static function delete_option( $id ) {
|
167 |
+
$options = get_option( 'wpfp_option' );
|
168 |
+
unset( $options[ $id ] );
|
169 |
+
|
170 |
+
return update_option( 'wpfp_option', $options, false );
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Returns the count of records in the database.
|
175 |
+
*
|
176 |
+
* @return null|string
|
177 |
+
*/
|
178 |
+
public static function record_count() {
|
179 |
+
|
180 |
+
return count( get_option( 'wpfp_option' ) );
|
181 |
+
}
|
182 |
+
|
183 |
+
/** Text displayed when no contact data is available */
|
184 |
+
public function no_items() {
|
185 |
+
esc_html_e( 'No option saved.', 'woo-feed' );
|
186 |
+
}
|
187 |
+
|
188 |
+
|
189 |
+
/** ************************************************************************
|
190 |
+
* REQUIRED if displaying checkboxes or using bulk actions! The 'cb' column
|
191 |
+
* is given special treatment when columns are processed. It ALWAYS needs to
|
192 |
+
* have it's own method.
|
193 |
+
*
|
194 |
+
* @param array $item A singular item (one full row's worth of data)
|
195 |
+
*
|
196 |
+
* @return string Text to be placed inside the column <td> (movie title only)
|
197 |
+
* *************************************************************************@see WP_List_Table::::single_row_columns()
|
198 |
+
*/
|
199 |
+
function column_cb( $item ) {
|
200 |
+
return sprintf(
|
201 |
+
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
|
202 |
+
/*$1%s*/
|
203 |
+
$this->_args['singular'], // Let's simply repurpose the table's singular label ("movie")
|
204 |
+
/*$2%s*/
|
205 |
+
$item['option_id'] // The value of the checkbox should be the record's id
|
206 |
+
);
|
207 |
+
}
|
208 |
+
|
209 |
+
|
210 |
+
function column_name( $item ) {
|
211 |
+
global $plugin_page;
|
212 |
+
$delete_nonce = wp_create_nonce( 'wf_delete_option' );
|
213 |
+
$title = '<strong>' . $item['option_name'] . '</strong>';
|
214 |
+
$actions = array(
|
215 |
+
'delete' => sprintf(
|
216 |
+
'<a val="?page=%s&action=%s&option=%s&_wpnonce=%s" class="single-option-delete" style="cursor: pointer;">' . __(
|
217 |
+
'Delete',
|
218 |
+
'woo-feed'
|
219 |
+
) . '</a>',
|
220 |
+
esc_attr( $plugin_page ),
|
221 |
+
'delete-option',
|
222 |
+
$item['option_id'],
|
223 |
+
$delete_nonce
|
224 |
+
),
|
225 |
+
);
|
226 |
+
|
227 |
+
return $title . $this->row_actions( $actions );
|
228 |
+
}
|
229 |
+
|
230 |
+
/** ************************************************************************
|
231 |
+
* REQUIRED! This method dictates the table's columns and titles. This should
|
232 |
+
* return an array where the key is the column slug (and class) and the value
|
233 |
+
* is the column's title text. If you need a checkbox for bulk actions, refer
|
234 |
+
* to the $columns array below.
|
235 |
+
*
|
236 |
+
* The 'cb' column is treated differently than the rest. If including a checkbox
|
237 |
+
* column in your table you must create a column_cb() method. If you don't need
|
238 |
+
* bulk actions or checkboxes, simply leave the 'cb' entry out of your array.
|
239 |
+
*
|
240 |
+
* @return array An associative array containing column information: 'slugs'=>'Visible Titles'
|
241 |
+
* *************************************************************************@see WP_List_Table::::single_row_columns()
|
242 |
+
*/
|
243 |
+
function get_columns() {
|
244 |
+
$columns = array(
|
245 |
+
'cb' => '<input type="checkbox" />', // Render a checkbox instead of text
|
246 |
+
'option_name' => __( 'Option Name', 'woo-feed' ),
|
247 |
+
'option_value' => __( 'Option Value', 'woo-feed' ),
|
248 |
+
'action' => __( 'Action', 'woo-feed' ),
|
249 |
+
);
|
250 |
+
|
251 |
+
return $columns;
|
252 |
+
}
|
253 |
+
|
254 |
+
|
255 |
+
/** ************************************************************************
|
256 |
+
* Optional. If you want one or more columns to be sortable (ASC/DESC toggle),
|
257 |
+
* you will need to register it here. This should return an array where the
|
258 |
+
* key is the column that needs to be sortable, and the value is db column to
|
259 |
+
* sort by. Often, the key and value will be the same, but this is not always
|
260 |
+
* the case (as the value is a column name from the database, not the list table).
|
261 |
+
*
|
262 |
+
* This method merely defines which columns should be sortable and makes them
|
263 |
+
* clickable - it does not handle the actual sorting. You still need to detect
|
264 |
+
* the ORDERBY and ORDER querystring variables within prepare_items() and sort
|
265 |
+
* your data accordingly (usually by modifying your query).
|
266 |
+
*
|
267 |
+
* @return array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool)
|
268 |
+
**************************************************************************/
|
269 |
+
function get_sortable_columns() {
|
270 |
+
$sortable_columns = array(
|
271 |
+
'option_name' => array( 'option_name', false ),
|
272 |
+
'option_value' => array( 'option_value', false ),
|
273 |
+
);
|
274 |
+
|
275 |
+
return $sortable_columns;
|
276 |
+
}
|
277 |
+
|
278 |
+
|
279 |
+
/** ************************************************************************
|
280 |
+
* Optional. If you need to include bulk actions in your list table, this is
|
281 |
+
* the place to define them. Bulk actions are an associative array in the format
|
282 |
+
* 'slug'=>'Visible Title'
|
283 |
+
*
|
284 |
+
* If this method returns an empty value, no bulk action will be rendered. If
|
285 |
+
* you specify any bulk actions, the bulk actions box will be rendered with
|
286 |
+
* the table automatically on display().
|
287 |
+
*
|
288 |
+
* Also note that list tables are not automatically wrapped in <form> elements,
|
289 |
+
* so you will need to create those manually in order for bulk actions to function.
|
290 |
+
*
|
291 |
+
* @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'
|
292 |
+
**************************************************************************/
|
293 |
+
function get_bulk_actions() {
|
294 |
+
$actions = array(
|
295 |
+
'bulk-delete' => __( 'Delete', 'woo-feed' ),
|
296 |
+
);
|
297 |
+
|
298 |
+
return $actions;
|
299 |
+
}
|
300 |
+
|
301 |
+
|
302 |
+
/** ************************************************************************
|
303 |
+
* Optional. You can handle your bulk actions anywhere or anyhow you prefer.
|
304 |
+
* For this example package, we will handle it in the class to keep things
|
305 |
+
* clean and organized.
|
306 |
+
*
|
307 |
+
* @see $this->prepare_items()
|
308 |
+
**************************************************************************/
|
309 |
+
public function process_bulk_action() {
|
310 |
+
// Detect when a bulk action is being triggered...
|
311 |
+
if ( 'delete-option' === $this->current_action() ) {
|
312 |
+
// In our file that handles the request, verify the nonce.
|
313 |
+
$nonce = isset( $_REQUEST['_wpnonce'] ) && ! empty( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( $_REQUEST['_wpnonce'] ) : '';
|
314 |
+
if ( ! wp_verify_nonce( $nonce, 'wf_delete_option' ) ) {
|
315 |
+
// die(_e('You do not have sufficient permission to delete!'));
|
316 |
+
update_option( 'wpf_message', esc_html__( 'Failed To Delete Option. You do not have sufficient permission to delete.', 'woo-feed' ), false );
|
317 |
+
wp_safe_redirect( admin_url( 'admin.php?page=webappick-wp-options&wpf_message=error' ) );
|
318 |
+
die();
|
319 |
+
} else {
|
320 |
+
if ( isset( $_GET['option'] ) && self::delete_option( $_GET['option'] ) ) {
|
321 |
+
update_option( 'wpf_message', esc_html__( 'Option Deleted Successfully.', 'woo-feed' ), false );
|
322 |
+
wp_safe_redirect( admin_url( 'admin.php?page=webappick-wp-options&wpf_message=success' ) );
|
323 |
+
die();
|
324 |
+
} else {
|
325 |
+
update_option( 'wpf_message', esc_html__( 'Failed To Delete Option.', 'woo-feed' ), false );
|
326 |
+
wp_safe_redirect( admin_url( 'admin.php?page=webappick-wp-options&wpf_message=error' ) );
|
327 |
+
die();
|
328 |
+
}
|
329 |
+
}
|
330 |
+
}
|
331 |
+
// Detect when a bulk action is being triggered...
|
332 |
+
if ( 'edit-mapping' === $this->current_action() ) {
|
333 |
+
// In our file that handles the request, verify the nonce.
|
334 |
+
$nonce = isset( $_REQUEST['_wpnonce'] ) && ! empty( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( $_REQUEST['_wpnonce'] ) : '';
|
335 |
+
if ( ! wp_verify_nonce( $nonce, 'wf_edit_mapping' ) ) {
|
336 |
+
wp_die( esc_html__( 'You do not have sufficient permission to delete!', 'woo-feed' ) );
|
337 |
+
}
|
338 |
+
}
|
339 |
+
|
340 |
+
// If the delete bulk action is triggered
|
341 |
+
if (
|
342 |
+
(
|
343 |
+
isset( $_POST['option'] ) ) &&
|
344 |
+
(
|
345 |
+
isset( $_POST['action'] ) &&
|
346 |
+
'bulk-delete' == $_POST['action']
|
347 |
+
) ||
|
348 |
+
(
|
349 |
+
isset( $_POST['action2'] ) &&
|
350 |
+
'bulk-delete' == $_POST['action2']
|
351 |
+
)
|
352 |
+
) {
|
353 |
+
if ( 'bulk-delete' === $this->current_action() ) {
|
354 |
+
$nonce = isset( $_REQUEST['_wpnonce'] ) && ! empty( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( $_REQUEST['_wpnonce'] ) : '';
|
355 |
+
if ( ! wp_verify_nonce( $nonce, 'bulk-' . $this->_args['plural'] ) ) {
|
356 |
+
update_option( 'wpf_message', esc_html__( 'Failed To Delete Option. You do not have sufficient permission to delete.', 'woo-feed' ), false );
|
357 |
+
wp_safe_redirect( admin_url( 'admin.php?page=webappick-wp-options&wpf_message=error' ) );
|
358 |
+
die();
|
359 |
+
} else {
|
360 |
+
// loop over the array of record IDs and delete them
|
361 |
+
$delete_ids = array_map( 'absint', $_POST['option'] );
|
362 |
+
$delete_ids = array_filter( $delete_ids );
|
363 |
+
// loop over the array of record IDs and delete them
|
364 |
+
if ( ! empty( $delete_ids ) ) {
|
365 |
+
$count = count( $delete_ids );
|
366 |
+
foreach ( $delete_ids as $id ) {
|
367 |
+
self::delete_option( $id );
|
368 |
+
}
|
369 |
+
$message = sprintf(
|
370 |
+
/* translators: 1: number of item deleted. */
|
371 |
+
esc_html( _n( '%d Option Successfully Deleted.', '%d Options Successfully Deleted.', $count, 'woo-feed' ) ),
|
372 |
+
$count
|
373 |
+
);
|
374 |
+
update_option( 'wpf_message', $message, false );
|
375 |
+
wp_safe_redirect( admin_url( 'admin.php?page=webappick-wp-options&wpf_message=success' ) );
|
376 |
+
die();
|
377 |
+
}
|
378 |
+
}
|
379 |
+
}
|
380 |
+
}
|
381 |
+
}
|
382 |
+
|
383 |
+
|
384 |
+
/** ************************************************************************
|
385 |
+
* REQUIRED! This is where you prepare your data for display. This method will
|
386 |
+
* usually be used to query the database, sort and filter the data, and generally
|
387 |
+
* get it ready to be displayed. At a minimum, we should set $this->items and
|
388 |
+
* $this->set_pagination_args(), although the following properties and methods
|
389 |
+
* are frequently interacted with here...
|
390 |
+
*
|
391 |
+
* @global WPDB $wpdb
|
392 |
+
* @uses $this->_column_headers
|
393 |
+
* @uses $this->items
|
394 |
+
* @uses $this->get_columns()
|
395 |
+
* @uses $this->get_sortable_columns()
|
396 |
+
* @uses $this->get_pagenum()
|
397 |
+
* @uses $this->set_pagination_args()
|
398 |
+
**************************************************************************/
|
399 |
+
function prepare_items() {
|
400 |
+
/**
|
401 |
+
* First, lets decide how many records per page to show
|
402 |
+
*/
|
403 |
+
$per_page = 10;
|
404 |
+
|
405 |
+
/**
|
406 |
+
* REQUIRED. Now we need to define our column headers. This includes a complete
|
407 |
+
* array of columns to be displayed (slugs & titles), a list of columns
|
408 |
+
* to keep hidden, and a list of columns that are sortable. Each of these
|
409 |
+
* can be defined in another method (as we've done here) before being
|
410 |
+
* used to build the value for our _column_headers property.
|
411 |
+
*/
|
412 |
+
$columns = $this->get_columns();
|
413 |
+
$hidden = array();
|
414 |
+
$sortable = $this->get_sortable_columns();
|
415 |
+
|
416 |
+
/**
|
417 |
+
* REQUIRED. Finally, we build an array to be used by the class for column
|
418 |
+
* headers. The $this->_column_headers property takes an array which contains
|
419 |
+
* 3 other arrays. One for all columns, one for hidden columns, and one
|
420 |
+
* for sortable columns.
|
421 |
+
*/
|
422 |
+
$this->_column_headers = array( $columns, $hidden, $sortable );
|
423 |
+
|
424 |
+
/**
|
425 |
+
* Optional. You can handle your bulk actions however you see fit. In this
|
426 |
+
* case, we'll handle them within our package just to keep things clean.
|
427 |
+
*/
|
428 |
+
$this->process_bulk_action();
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Instead of querying a database, we're going to fetch the example data
|
432 |
+
* property we created for use in this plugin. This makes this example
|
433 |
+
* package slightly different than one you might build on your own. In
|
434 |
+
* this example, we'll be using array manipulation to sort and paginate
|
435 |
+
* our data. In a real-world implementation, you will probably want to
|
436 |
+
* use sort and pagination data to build a custom query instead, as you'll
|
437 |
+
* be able to use your precisely-queried data immediately.
|
438 |
+
*/
|
439 |
+
$data = $this->get_mappings();
|
440 |
+
|
441 |
+
usort( $data, 'woo_feed_usort_reorder' );
|
442 |
+
|
443 |
+
/***********************************************************************
|
444 |
+
* ---------------------------------------------------------------------
|
445 |
+
*
|
446 |
+
* In a real-world situation, this is where you would place your query.
|
447 |
+
*
|
448 |
+
* For information on making queries in WordPress, see this Codex entry:
|
449 |
+
* http://codex.wordpress.org/Class_Reference/wpdb
|
450 |
+
*
|
451 |
+
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
452 |
+
* ---------------------------------------------------------------------
|
453 |
+
*/
|
454 |
+
|
455 |
+
/**
|
456 |
+
* REQUIRED for pagination. Let's figure out what page the user is currently
|
457 |
+
* looking at. We'll need this later, so you should always include it in
|
458 |
+
* your own package classes.
|
459 |
+
*/
|
460 |
+
$current_page = $this->get_pagenum();
|
461 |
+
|
462 |
+
/**
|
463 |
+
* REQUIRED for pagination. Let's check how many items are in our data array.
|
464 |
+
* In real-world use, this would be the total number of items in your database,
|
465 |
+
* without filtering. We'll need this later, so you should always include it
|
466 |
+
* in your own package classes.
|
467 |
+
*/
|
468 |
+
$total_items = count( $data );
|
469 |
+
|
470 |
+
/**
|
471 |
+
* The WP_List_Table class does not handle pagination for us, so we need
|
472 |
+
* to ensure that the data is trimmed to only the current page. We can use
|
473 |
+
* array_slice() to
|
474 |
+
*/
|
475 |
+
$data = array_slice( $data, ( ( $current_page - 1 ) * $per_page ), $per_page );
|
476 |
+
|
477 |
+
/**
|
478 |
+
* REQUIRED. We also have to register our pagination options & calculations.
|
479 |
+
*/
|
480 |
+
$this->set_pagination_args(
|
481 |
+
array(
|
482 |
+
'total_items' => $total_items, // WE have to calculate the total number of items
|
483 |
+
'per_page' => $per_page, // WE have to determine how many items to show on a page
|
484 |
+
'total_pages' => ceil( $total_items / $per_page ), // WE have to calculate the total number of pages
|
485 |
+
)
|
486 |
+
);
|
487 |
+
|
488 |
+
// $this->set_pagination_args( array(
|
489 |
+
// 'total_items' => $total_items, //WE have to calculate the total number of items
|
490 |
+
// 'per_page' => $per_page //WE have to determine how many items to show on a page
|
491 |
+
// ) );
|
492 |
+
|
493 |
+
/**
|
494 |
+
* REQUIRED. Now we can add our *sorted* data to the items property, where
|
495 |
+
* it can be used by the rest of the class.
|
496 |
+
*/
|
497 |
+
$this->items = $data;
|
498 |
+
}
|
499 |
+
|
500 |
+
|
501 |
+
}
|
admin/images/woo-feed-lite.svg
CHANGED
@@ -1,33 +1,83 @@
|
|
1 |
-
<?xml version="1.0" encoding="
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 106.3 25" style="enable-background:new 0 0 106.3 25;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#0088F7;}
|
7 |
+
.st1{fill:#FFFFFF;}
|
8 |
+
.st2{fill:#2F3C50;}
|
9 |
+
.st3{fill:#488EFF;}
|
10 |
+
</style>
|
11 |
+
<desc>Created with Sketch.</desc>
|
12 |
+
<g id="Group-2" transform="translate(107.000000, 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 104.1 25" style="enable-background:new 0 0 104.1 25;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#0088F7;}
|
7 |
+
.st1{fill:#2F3C50;}
|
8 |
+
.st2{fill:#488EFF;}
|
9 |
+
.st3{fill:#FFFFFF;}
|
10 |
+
</style>
|
11 |
+
<desc>Created with Sketch.</desc>
|
12 |
+
<g id="Group-2" transform="translate(107.000000, 0.000000)">
|
13 |
+
<path id="Rectangle" class="st0" d="M-15.5,0h11.4c0.7,0,1.3,0.6,1.3,1.3v5.4C-2.9,7.4-3.4,8-4.2,8h-11.4c-0.7,0-1.3-0.6-1.3-1.3
|
14 |
+
V1.3C-16.9,0.6-16.3,0-15.5,0z"/>
|
15 |
+
</g>
|
16 |
+
<g>
|
17 |
+
<g>
|
18 |
+
<path class="st1" d="M30,18.4c-1.7,0-3-0.5-3.8-1.4c-0.9-0.9-1.3-2.3-1.3-4c0-0.8,0.1-1.6,0.4-2.3c0.3-0.7,0.6-1.3,1.1-1.7
|
19 |
+
c0.5-0.5,1-0.8,1.7-1c0.6-0.2,1.3-0.3,2.1-0.3c0.4,0,0.8,0,1.2,0.1c0.3,0.1,0.7,0.1,1,0.2c0.3,0.1,0.5,0.1,0.7,0.3
|
20 |
+
c0.2,0.1,0.3,0.1,0.4,0.2l-0.7,1.9c-0.3-0.1-0.7-0.3-1.1-0.4c-0.4-0.1-0.9-0.2-1.5-0.2c-0.3,0-0.7,0.1-1,0.2s-0.6,0.3-0.9,0.6
|
21 |
+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.7"/>
|
73 |
+
</g>
|
74 |
+
<g>
|
75 |
+
<path class="st3" d="M94,1.7c0.5,0,0.8,0.1,1.2,0.3c0.4,0.3,0.5,0.8,0.5,1.1c0,0.2,0,0.7-0.4,1c-0.2,0.2-0.6,0.4-1.1,0.4h-0.6v1.7
|
76 |
+
h-0.9V1.7H94z M93.5,3.8h0.4c0.2,0,0.4,0,0.6-0.1c0.2-0.1,0.2-0.3,0.2-0.5c0-0.2-0.1-0.4-0.2-0.5c-0.2-0.1-0.4-0.1-0.6-0.1h-0.3
|
77 |
+
V3.8z"/>
|
78 |
+
<path class="st3" d="M96.1,3.3h0.8v0.4c0.1-0.2,0.3-0.4,0.4-0.4c0.1-0.1,0.3-0.1,0.5-0.1c0.1,0,0.3,0,0.3,0.1L98,4
|
79 |
+
c-0.1-0.1-0.2-0.1-0.4-0.1c-0.2,0-0.4,0-0.5,0.2c-0.2,0.2-0.2,0.4-0.2,0.6v1.4h-0.8V3.3z"/>
|
80 |
+
<path class="st3" d="M101.1,3.6c0.3,0.3,0.5,0.7,0.5,1.1c0,0.5-0.2,0.9-0.5,1.1c-0.2,0.2-0.6,0.4-1.2,0.4c-0.5,0-0.9-0.2-1.2-0.4
|
81 |
+
c-0.3-0.3-0.5-0.7-0.5-1.1c0-0.5,0.2-0.9,0.5-1.1c0.2-0.2,0.6-0.4,1.2-0.4C100.5,3.2,100.9,3.4,101.1,3.6z M100.8,4.7
|
82 |
+
c0-0.5-0.3-0.8-0.8-0.8s-0.8,0.4-0.8,0.8c0,0.4,0.3,0.8,0.8,0.8C100.4,5.6,100.8,5.2,100.8,4.7z"/>
|
83 |
+
</g>
|
84 |
+
</svg>
|
admin/partials/woo-feed-add-option.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $wooFeedDropDown = new Woo_Feed_Dropdown(); ?>
|
2 |
+
<div class="wrap">
|
3 |
+
<h2><?php esc_html_e( 'Add Option', 'woo-feed' ); ?></h2>
|
4 |
+
|
5 |
+
<form action="" name="feed" method="post" autocomplete="off">
|
6 |
+
<?php wp_nonce_field( 'woo-feed-add-option' ); ?>
|
7 |
+
<table class="widefat" style="max-width: 440px;margin: 20px auto;padding: 20px;">
|
8 |
+
<tbody>
|
9 |
+
<tr><td colspan="2"></td></tr>
|
10 |
+
<tr>
|
11 |
+
<td style="width: 130px;max-width: 130px;"><label for="wpfp_option"><b><?php esc_html_e( 'Option Name', 'woo-feed' ); ?> <span class="requiredIn">*</span></b></label></td>
|
12 |
+
<td>
|
13 |
+
<select name="wpfp_option" id="wpfp_option" class="selectize generalInput" style="width: 100%;" placeholder="<?php esc_attr_e( 'Search Option Name', 'woo-feed' ); ?>" required><?php $wooFeedDropDown->woo_feed_get_wp_options(); ?></select>
|
14 |
+
</td>
|
15 |
+
</tr>
|
16 |
+
<tr>
|
17 |
+
<td colspan="2" style="text-align: center">
|
18 |
+
<button type="submit" class="button button-primary"><?php esc_html_e( 'Add Option', 'woo-feed' ); ?></button>
|
19 |
+
</td>
|
20 |
+
</tr>
|
21 |
+
<tr><td colspan="2"></td></tr>
|
22 |
+
</tbody>
|
23 |
+
</table>
|
24 |
+
</form>
|
25 |
+
</div>
|
admin/partials/woo-feed-option-list.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Category Mapping List View
|
4 |
+
*
|
5 |
+
* @link https://webappick.com/
|
6 |
+
* @since 4.3.33
|
7 |
+
*
|
8 |
+
* @package Woo_Feed
|
9 |
+
* @subpackage Woo_Feed/admin/partial
|
10 |
+
* @author Ohidul Islam <wahid@webappick.com>
|
11 |
+
*/
|
12 |
+
|
13 |
+
$myListTable = new Woo_Feed_Option_list();
|
14 |
+
$myListTable->prepare_items();
|
15 |
+
global $plugin_page;
|
16 |
+
?>
|
17 |
+
<div class="wrap">
|
18 |
+
<h2><?php esc_html_e( 'Option List', 'woo-feed' ); ?><a href="<?php echo esc_url( admin_url( 'admin.php?page=webappick-wp-options&action=add-option' ) ); ?>" class="page-title-action"><?php esc_html_e( 'Add New Option', 'woo-feed' ); ?></a></h2>
|
19 |
+
<?php WPFFWMessage()->displayMessages(); ?>
|
20 |
+
<form id="contact-filter" method="post">
|
21 |
+
<!-- For plugins, we also need to ensure that the form posts back to our current page -->
|
22 |
+
<input type="hidden" name="page" value="<?php echo esc_attr( $plugin_page ); ?>"/>
|
23 |
+
<?php // $myListTable->search_box('search', 'search_id'); ?>
|
24 |
+
<!-- Now we can render the completed list table -->
|
25 |
+
<?php $myListTable->display(); ?>
|
26 |
+
</form>
|
27 |
+
</div>
|
28 |
+
|
29 |
+
<script type="text/javascript">
|
30 |
+
(function($, window, document){
|
31 |
+
$(document).ready(function () {
|
32 |
+
$('body').find(".single-option-delete").click(function () {
|
33 |
+
if (confirm('<?php esc_html_e( 'Are You Sure to Delete?', 'woo-feed' ); ?>')) {
|
34 |
+
window.location.href = $(this).attr('val');
|
35 |
+
}
|
36 |
+
});
|
37 |
+
$('#doaction').click(function () {
|
38 |
+
return confirm('<?php esc_html_e( 'Are You Sure to Delete?', 'woo-feed' ); ?>');
|
39 |
+
});
|
40 |
+
$('#doaction2').click(function () {
|
41 |
+
return confirm('<?php esc_html_e( 'Are You Sure to Delete?', 'woo-feed' ); ?>');
|
42 |
+
});
|
43 |
+
});
|
44 |
+
})(jQuery, window, document);
|
45 |
+
</script>
|
includes/class-woo-feed.php
CHANGED
@@ -186,6 +186,11 @@ class Woo_Feed {
|
|
186 |
*/
|
187 |
require_once WOO_FEED_FREE_PATH . 'admin/class-woo-feed-manage-list.php';
|
188 |
|
|
|
|
|
|
|
|
|
|
|
189 |
/**
|
190 |
* The class responsible for making category list
|
191 |
*/
|
186 |
*/
|
187 |
require_once WOO_FEED_FREE_PATH . 'admin/class-woo-feed-manage-list.php';
|
188 |
|
189 |
+
/**
|
190 |
+
* The class responsible for making feed list
|
191 |
+
*/
|
192 |
+
require_once WOO_FEED_FREE_PATH . 'admin/class-woo-feed-option-list.php';
|
193 |
+
|
194 |
/**
|
195 |
* The class responsible for making category list
|
196 |
*/
|
includes/classes/class-woo-feed-dropdown.php
CHANGED
@@ -158,6 +158,67 @@ class Woo_Feed_Dropdown {
|
|
158 |
|
159 |
return $taxonomy;
|
160 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
|
162 |
// Product Attribute DropDowns.
|
163 |
|
@@ -271,7 +332,6 @@ class Woo_Feed_Dropdown {
|
|
271 |
}
|
272 |
}
|
273 |
|
274 |
-
|
275 |
if ( class_exists( 'WPSEO_Frontend' ) ) {
|
276 |
//add yoast title array in the dropdown
|
277 |
$search_key = in_array( '_aioseop_title', array_keys($attributes) ) ? '_aioseop_title' : 'title';
|
@@ -366,12 +426,26 @@ class Woo_Feed_Dropdown {
|
|
366 |
$attributes['---3'] = '';
|
367 |
}
|
368 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
369 |
// Category Mapping
|
370 |
$_category_mappings = $this->getCustomCategoryMappedAttributes();
|
371 |
if ( ! empty( $_category_mappings ) && is_array( $_category_mappings ) ) {
|
372 |
-
$attributes['--
|
373 |
$attributes = $attributes + $_category_mappings;
|
374 |
-
$attributes['---
|
375 |
}
|
376 |
|
377 |
return $attributes;
|
@@ -477,6 +551,92 @@ class Woo_Feed_Dropdown {
|
|
477 |
|
478 |
return $options;
|
479 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
480 |
|
481 |
// Merchant Attribute DropDown.
|
482 |
|
158 |
|
159 |
return $taxonomy;
|
160 |
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Get product related post meta keys (filtered)
|
164 |
+
*
|
165 |
+
* @return array
|
166 |
+
*/
|
167 |
+
protected function getCustomAttributes() {
|
168 |
+
$attributes = woo_feed_get_cached_data( 'woo_feed_dropdown_product_custom_attributes' );
|
169 |
+
if ( false === $attributes ) {
|
170 |
+
// Get Variation Attributes
|
171 |
+
global $wpdb;
|
172 |
+
$attributes = array();
|
173 |
+
$sql = "SELECT DISTINCT( meta_key ) FROM $wpdb->postmeta
|
174 |
+
WHERE post_id IN (
|
175 |
+
SELECT ID FROM $wpdb->posts WHERE post_type = 'product_variation' -- local attributes will be found on variation product meta only with attribute_ suffix
|
176 |
+
) AND (
|
177 |
+
meta_key LIKE 'attribute_%' -- include only product attributes from meta list
|
178 |
+
AND meta_key NOT LIKE 'attribute_pa_%'
|
179 |
+
)";
|
180 |
+
// sanitization ok
|
181 |
+
$localAttributes = $wpdb->get_col( $sql ); // phpcs:ignore
|
182 |
+
foreach ( $localAttributes as $localAttribute ) {
|
183 |
+
$localAttribute = str_replace( 'attribute_', '', $localAttribute );
|
184 |
+
$attributes[ Woo_Feed_Products_v3::PRODUCT_ATTRIBUTE_PREFIX . $localAttribute ] = ucwords( str_replace( '-', ' ', $localAttribute ) );
|
185 |
+
}
|
186 |
+
|
187 |
+
// Get Product Custom Attributes
|
188 |
+
$sql = 'SELECT meta.meta_id, meta.meta_key as name, meta.meta_value as type FROM ' . $wpdb->postmeta . ' AS meta, ' . $wpdb->posts . " AS posts WHERE meta.post_id = posts.id AND posts.post_type LIKE '%product%' AND meta.meta_key='_product_attributes';";
|
189 |
+
$customAttributes = $wpdb->get_results( $sql ); // phpcs:ignore
|
190 |
+
|
191 |
+
if ( ! empty( $customAttributes ) ) {
|
192 |
+
foreach ( $customAttributes as $key => $value ) {
|
193 |
+
$product_attr = maybe_unserialize( $value->type );
|
194 |
+
if ( ! empty( $product_attr ) && is_array( $product_attr ) ) {
|
195 |
+
foreach ( $product_attr as $key => $arr_value ) {
|
196 |
+
if ( strpos( $key, 'pa_' ) === false ) {
|
197 |
+
$attributes[ Woo_Feed_Products_v3::PRODUCT_ATTRIBUTE_PREFIX . $key ] = ucwords( str_replace( '-', ' ', $arr_value['name'] ) );
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
}
|
202 |
+
}
|
203 |
+
woo_feed_set_cache_data( 'woo_feed_dropdown_product_custom_attributes', $attributes );
|
204 |
+
}
|
205 |
+
|
206 |
+
// @TODO implement filter hook
|
207 |
+
return (array) $attributes;
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Get All Options
|
212 |
+
*
|
213 |
+
* @return array
|
214 |
+
*/
|
215 |
+
protected function getAllOptions() {
|
216 |
+
$_wp_options = wp_list_pluck( get_option( 'wpfp_option', array() ), 'option_name');
|
217 |
+
$_wp_options_val = str_replace('wf_option_', '', $_wp_options);
|
218 |
+
$_wp_options = array_combine($_wp_options, $_wp_options_val);
|
219 |
+
|
220 |
+
return $_wp_options;
|
221 |
+
}
|
222 |
|
223 |
// Product Attribute DropDowns.
|
224 |
|
332 |
}
|
333 |
}
|
334 |
|
|
|
335 |
if ( class_exists( 'WPSEO_Frontend' ) ) {
|
336 |
//add yoast title array in the dropdown
|
337 |
$search_key = in_array( '_aioseop_title', array_keys($attributes) ) ? '_aioseop_title' : 'title';
|
426 |
$attributes['---3'] = '';
|
427 |
}
|
428 |
|
429 |
+
$_custom_attributes = $this->getCustomAttributes();
|
430 |
+
if ( ! empty( $_custom_attributes ) && is_array( $_custom_attributes ) ) {
|
431 |
+
$attributes['--4'] = esc_html__( 'Product Custom Attributes', 'woo-feed' );
|
432 |
+
$attributes = $attributes + $_custom_attributes;
|
433 |
+
$attributes['---4'] = '';
|
434 |
+
}
|
435 |
+
|
436 |
+
$_wp_options = $this->getAllOptions();
|
437 |
+
if ( ! empty( $_wp_options ) && is_array( $_wp_options ) ) {
|
438 |
+
$attributes['--5'] = esc_html__( 'WP Options', 'woo-feed' );
|
439 |
+
$attributes = $attributes + $_wp_options;
|
440 |
+
$attributes['---5'] = '';
|
441 |
+
}
|
442 |
+
|
443 |
// Category Mapping
|
444 |
$_category_mappings = $this->getCustomCategoryMappedAttributes();
|
445 |
if ( ! empty( $_category_mappings ) && is_array( $_category_mappings ) ) {
|
446 |
+
$attributes['--6'] = esc_html__( 'Category Mappings', 'woo-feed' );
|
447 |
$attributes = $attributes + $_category_mappings;
|
448 |
+
$attributes['---6'] = '';
|
449 |
}
|
450 |
|
451 |
return $attributes;
|
551 |
|
552 |
return $options;
|
553 |
}
|
554 |
+
|
555 |
+
|
556 |
+
/**
|
557 |
+
* Get WP Option Table Item List
|
558 |
+
*
|
559 |
+
* @param string $selected
|
560 |
+
*/
|
561 |
+
public function woo_feed_get_wp_options( $selected = '' ) {
|
562 |
+
$options = $this->get_cached_dropdown( 'woo_feed_dropdown_wp_options', $selected );
|
563 |
+
if ( false === $options ) {
|
564 |
+
global $wpdb;
|
565 |
+
$default_exclude_keys = array(
|
566 |
+
'db_version',
|
567 |
+
'cron',
|
568 |
+
'wpfp_option',
|
569 |
+
'recovery_keys',
|
570 |
+
'wf_schedule',
|
571 |
+
'woo_feed_output_type_options',
|
572 |
+
'ftp_credentials',
|
573 |
+
);
|
574 |
+
|
575 |
+
/**
|
576 |
+
* Exclude Option Names from dropdown
|
577 |
+
*
|
578 |
+
* @param array $exclude Option Names to exclude.
|
579 |
+
* @param array $default_exclude_keys Option Names by default.
|
580 |
+
*/
|
581 |
+
$user_exclude = apply_filters( 'woo_feed_dropdown_exclude_option_names', null, $default_exclude_keys );
|
582 |
+
|
583 |
+
if ( is_array( $user_exclude ) && ! empty( $user_exclude ) ) {
|
584 |
+
$user_exclude = esc_sql( $user_exclude );
|
585 |
+
$default_exclude_keys = array_merge( $default_exclude_keys, $user_exclude );
|
586 |
+
}
|
587 |
+
|
588 |
+
$default_exclude_keys = array_map( 'esc_sql', $default_exclude_keys );
|
589 |
+
$exclude_keys = '\'' . implode( '\', \'', $default_exclude_keys ) . '\'';
|
590 |
+
|
591 |
+
$default_exclude_key_patterns = array(
|
592 |
+
'mailserver_%',
|
593 |
+
'_transient%',
|
594 |
+
'_site_transient%',
|
595 |
+
'wf_config%',
|
596 |
+
'wf_feed_%',
|
597 |
+
'wpfw_%',
|
598 |
+
'wf_dattribute_%',
|
599 |
+
'wf_cmapping_%',
|
600 |
+
'webappick-woo%',
|
601 |
+
'widget_%',
|
602 |
+
);
|
603 |
+
|
604 |
+
/**
|
605 |
+
* Exclude Option Name patterns from dropdown
|
606 |
+
*
|
607 |
+
* @param array $exclude Option Name Patter to exclude.
|
608 |
+
* @param array $default_exclude_key_patterns Option Name Patters by default.
|
609 |
+
*/
|
610 |
+
$user_exclude_patterns = apply_filters(
|
611 |
+
'woo_feed_dropdown_exclude_option_name_pattern',
|
612 |
+
null,
|
613 |
+
$default_exclude_key_patterns
|
614 |
+
);
|
615 |
+
if ( is_array( $user_exclude_patterns ) && ! empty( $user_exclude_patterns ) ) {
|
616 |
+
$default_exclude_key_patterns = array_merge( $default_exclude_key_patterns, $user_exclude_patterns );
|
617 |
+
}
|
618 |
+
$exclude_key_patterns = '';
|
619 |
+
foreach ( $default_exclude_key_patterns as $pattern ) {
|
620 |
+
$exclude_key_patterns .= $wpdb->prepare( ' AND option_name NOT LIKE %s', $pattern );
|
621 |
+
}
|
622 |
+
|
623 |
+
/** @noinspection SqlConstantCondition */
|
624 |
+
$query = "SELECT * FROM $wpdb->options
|
625 |
+
WHERE 1=1 AND
|
626 |
+
( option_name NOT IN ( $exclude_keys ) $exclude_key_patterns )";
|
627 |
+
// sql escaped, cached
|
628 |
+
$options = $wpdb->get_results( $query ); // phpcs:ignore
|
629 |
+
$item = array();
|
630 |
+
if ( is_array( $options ) && ! empty( $options ) ) {
|
631 |
+
foreach ( $options as $key => $value ) {
|
632 |
+
$item[ esc_attr( $value->option_name ) . '-' . esc_attr( $value->option_name ) ] = esc_html( $value->option_name );
|
633 |
+
}
|
634 |
+
}
|
635 |
+
$options = $this->cache_dropdown( 'woo_feed_dropdown_wp_options', $item, $selected );
|
636 |
+
}
|
637 |
+
// HTML option element with escaped label and value
|
638 |
+
echo $options; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
639 |
+
}
|
640 |
|
641 |
// Merchant Attribute DropDown.
|
642 |
|
includes/classes/class-woo-feed-engine.php
CHANGED
@@ -95,8 +95,9 @@ class WF_Engine
|
|
95 |
$default = $this->rules['default'];
|
96 |
|
97 |
|
98 |
-
$wf_attr
|
99 |
-
$wf_cattr
|
|
|
100 |
|
101 |
# Map Merchant Attributes and Woo Attributes
|
102 |
$countAttr = 0;
|
@@ -127,6 +128,10 @@ class WF_Engine
|
|
127 |
$wf_attr[] = $attr['value'];
|
128 |
}
|
129 |
|
|
|
|
|
|
|
|
|
130 |
if (strpos($attr['value'], 'wf_cattr_') !== false) {
|
131 |
$wf_cattr[] = $attr['value'];
|
132 |
}
|
@@ -153,6 +158,15 @@ class WF_Engine
|
|
153 |
$this->storeProducts[$key][$cattr_value] = $this->productClass->getProductMeta($id,$cattr_value);
|
154 |
}
|
155 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
157 |
}
|
158 |
}
|
95 |
$default = $this->rules['default'];
|
96 |
|
97 |
|
98 |
+
$wf_attr = array();
|
99 |
+
$wf_cattr = array();
|
100 |
+
$wf_option = array();
|
101 |
|
102 |
# Map Merchant Attributes and Woo Attributes
|
103 |
$countAttr = 0;
|
128 |
$wf_attr[] = $attr['value'];
|
129 |
}
|
130 |
|
131 |
+
if ( strpos( $attr['value'], Woo_Feed_Products::WP_OPTION_PREFIX ) !== false ) {
|
132 |
+
$wf_option[] = $attr['value'];
|
133 |
+
}
|
134 |
+
|
135 |
if (strpos($attr['value'], 'wf_cattr_') !== false) {
|
136 |
$wf_cattr[] = $attr['value'];
|
137 |
}
|
158 |
$this->storeProducts[$key][$cattr_value] = $this->productClass->getProductMeta($id,$cattr_value);
|
159 |
}
|
160 |
}
|
161 |
+
|
162 |
+
// Get WP Option Value
|
163 |
+
if ( count( $wf_option ) ) {
|
164 |
+
foreach ( $wf_option as $wf_option_key => $wf_option_value ) {
|
165 |
+
$optionName = str_replace( 'wf_option_', '', $wf_option_value );
|
166 |
+
$optionValue = get_option( $optionName );
|
167 |
+
$this->storeProducts[ $key ][ $wf_option_value ] = $optionValue;
|
168 |
+
}
|
169 |
+
}
|
170 |
}
|
171 |
}
|
172 |
}
|
includes/classes/class-woo-feed-products-v3.php
CHANGED
@@ -256,6 +256,21 @@ class Woo_Feed_Products_v3
|
|
256 |
*/
|
257 |
const PRODUCT_CATEGORY_MAPPING_PREFIX = 'wf_cmapping_';
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
public function __construct( $config ) {
|
260 |
$this->config = woo_feed_parse_feed_rules($config);
|
261 |
$this->queryType = woo_feed_get_options('product_query_type');
|
@@ -1412,6 +1427,9 @@ class Woo_Feed_Products_v3
|
|
1412 |
}elseif ( false !== strpos( $attribute, self::PRODUCT_CATEGORY_MAPPING_PREFIX ) ) {
|
1413 |
$id = $product->is_type( 'variation' ) ? $product->get_parent_id() : $product->get_id();
|
1414 |
$output = woo_feed_get_category_mapping_value( $attribute, $id );
|
|
|
|
|
|
|
1415 |
} elseif ( 'image_' == substr($attribute, 0, 6) ) {
|
1416 |
// For additional image method images() will be used with extra parameter - image number
|
1417 |
$imageKey = explode('_', $attribute);
|
256 |
*/
|
257 |
const PRODUCT_CATEGORY_MAPPING_PREFIX = 'wf_cmapping_';
|
258 |
|
259 |
+
/**
|
260 |
+
* WordPress Option Prefix
|
261 |
+
*
|
262 |
+
* @since 4.3.33
|
263 |
+
* @var string
|
264 |
+
* @author Nazrul Islam Nayan
|
265 |
+
*/
|
266 |
+
const WP_OPTION_PREFIX = 'wf_option_';
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Woo_Feed_Products_v3 constructor.
|
270 |
+
*
|
271 |
+
* @param $config
|
272 |
+
* @return void
|
273 |
+
*/
|
274 |
public function __construct( $config ) {
|
275 |
$this->config = woo_feed_parse_feed_rules($config);
|
276 |
$this->queryType = woo_feed_get_options('product_query_type');
|
1427 |
}elseif ( false !== strpos( $attribute, self::PRODUCT_CATEGORY_MAPPING_PREFIX ) ) {
|
1428 |
$id = $product->is_type( 'variation' ) ? $product->get_parent_id() : $product->get_id();
|
1429 |
$output = woo_feed_get_category_mapping_value( $attribute, $id );
|
1430 |
+
} elseif ( false !== strpos( $attribute, self::WP_OPTION_PREFIX ) ) {
|
1431 |
+
$optionName = str_replace( self::WP_OPTION_PREFIX, '', $attribute );
|
1432 |
+
$output = get_option( $optionName );
|
1433 |
} elseif ( 'image_' == substr($attribute, 0, 6) ) {
|
1434 |
// For additional image method images() will be used with extra parameter - image number
|
1435 |
$imageKey = explode('_', $attribute);
|
includes/classes/class-woo-feed-products.php
CHANGED
@@ -67,8 +67,13 @@ class Woo_Feed_Products {
|
|
67 |
public $feedRule;
|
68 |
public $idExist = array();
|
69 |
public $pi;
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
public function wooProductQuery( $arg ) {
|
74 |
|
67 |
public $feedRule;
|
68 |
public $idExist = array();
|
69 |
public $pi;
|
70 |
+
/**
|
71 |
+
* WordPress Option Prefix
|
72 |
+
*
|
73 |
+
* @since 4.3.33
|
74 |
+
* @var string
|
75 |
+
*/
|
76 |
+
const WP_OPTION_PREFIX = 'wf_option_';
|
77 |
|
78 |
public function wooProductQuery( $arg ) {
|
79 |
|
includes/helper.php
CHANGED
@@ -4222,5 +4222,36 @@ if ( ! function_exists('woo_feed_exclude_feed_from_hyper_cache') ) {
|
|
4222 |
}
|
4223 |
}
|
4224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4225 |
|
4226 |
// End of file helper.php.
|
4222 |
}
|
4223 |
}
|
4224 |
|
4225 |
+
if ( ! function_exists( 'woo_feed_wp_options' ) ) {
|
4226 |
+
function woo_feed_wp_options() {
|
4227 |
+
if ( isset( $_GET['action'] ) && 'add-option' == $_GET['action'] ) {
|
4228 |
+
if ( count( $_POST ) && isset( $_POST['wpfp_option'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
|
4229 |
+
check_admin_referer( 'woo-feed-add-option' );
|
4230 |
+
|
4231 |
+
$options = get_option( 'wpfp_option', array() );
|
4232 |
+
$newOption = sanitize_text_field( $_POST['wpfp_option'] );
|
4233 |
+
$id = explode( '-', $newOption );
|
4234 |
+
if ( false !== array_search( $id[0], array_column( $options, 'option_id' ) ) ) { // found
|
4235 |
+
update_option( 'wpf_message', esc_html__( 'Option Already Added.', 'woo-feed' ), false );
|
4236 |
+
wp_safe_redirect( admin_url( 'admin.php?page=webappick-wp-options&wpf_message=error' ) );
|
4237 |
+
die();
|
4238 |
+
} else {
|
4239 |
+
$options[ $id[0] ] = array(
|
4240 |
+
'option_id' => $id[0],
|
4241 |
+
'option_name' => 'wf_option_' . str_replace( $id[0] . '-', '', $newOption ),
|
4242 |
+
);
|
4243 |
+
update_option( 'wpfp_option', $options, false );
|
4244 |
+
update_option( 'wpf_message', esc_html__( 'Option Successfully Added.', 'woo-feed' ), false );
|
4245 |
+
wp_safe_redirect( admin_url( 'admin.php?page=webappick-wp-options&wpf_message=success' ) );
|
4246 |
+
die();
|
4247 |
+
}
|
4248 |
+
}
|
4249 |
+
require WOO_FEED_FREE_ADMIN_PATH . 'partials/woo-feed-add-option.php';
|
4250 |
+
} else {
|
4251 |
+
require WOO_FEED_FREE_ADMIN_PATH . 'partials/woo-feed-option-list.php';
|
4252 |
+
}
|
4253 |
+
}
|
4254 |
+
}
|
4255 |
+
|
4256 |
|
4257 |
// End of file helper.php.
|
woo-feed.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Plugin Name: CTX Feed
|
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 |
-
* Version: 4.3.
|
14 |
* Author: WebAppick
|
15 |
* Author URI: https://webappick.com/
|
16 |
* License: GPL v2
|
@@ -38,7 +38,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
|
|
38 |
* @var string
|
39 |
* @since 3.1.6
|
40 |
*/
|
41 |
-
define( 'WOO_FEED_FREE_VERSION', '4.3.
|
42 |
}
|
43 |
|
44 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|
10 |
* Plugin Name: CTX Feed
|
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 |
+
* Version: 4.3.33
|
14 |
* Author: WebAppick
|
15 |
* Author URI: https://webappick.com/
|
16 |
* License: GPL v2
|
38 |
* @var string
|
39 |
* @since 3.1.6
|
40 |
*/
|
41 |
+
define( 'WOO_FEED_FREE_VERSION', '4.3.33' );
|
42 |
}
|
43 |
|
44 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|