Changeset 2276958
- Timestamp:
- 04/06/2020 08:02:14 AM (6 years ago)
- Location:
- woo-to-facebook-shop/trunk
- Files:
-
- 7 edited
-
css/wctofb_setting.css (modified) (1 diff)
-
index.php (modified) (1 diff)
-
license.txt (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
uninstall.php (modified) (1 diff)
-
wctofb.php (modified) (28 diffs)
-
wctofb_woocommerce_feeds.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-to-facebook-shop/trunk/css/wctofb_setting.css
r2100176 r2276958 1 /* Version 2.5.1 */ 1 /* Version 2.5.4 */ 2 2 3 #product_sync,.product_sync.column-product_sync{width: 40px;} 4 3 5 .wctofb_product_sync { border: medium none; cursor: pointer; padding: 0;} -
woo-to-facebook-shop/trunk/index.php
r1851608 r2276958 1 1 <?php 2 2 3 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 4 3 5 /** Just sitting silent **/ -
woo-to-facebook-shop/trunk/license.txt
r2155447 r2276958 1 Social Commerce for WooCommerce 1 WooCommerce to facebook shop 2 2 3 3 Copyright 2017 by the contributors … … 20 20 permission notices: 21 21 22 Social Commerce for WooCommerceis created by premiumthemes23 Social Commerce for WooCommerceis released by premiumthemes under the GPL v2 <https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html> or later.22 WooCommerce to facebook shop is created by premiumthemes 23 WooCommerce to facebook shop is released by premiumthemes under the GPL v2 <https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html> or later. 24 24 25 25 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -
woo-to-facebook-shop/trunk/readme.txt
r2155447 r2276958 5 5 Tags: Facebook, ecommerce, Facebook store, Facebook shop, import, woocommerce, woo-commerce, wp-commerce, Facebook marketing, Online Sales, Social commerce, Twitter, G+, google, google plus, comments, Social campaigns, wordpress Woocommerce, share, blog, plugin, product sharing, network shop 6 6 Requires at least: 3.3.1 7 Tested up to: 5. 17 Tested up to: 5.4 8 8 Stable tag: 4.3 9 9 License: GPLv2 or later … … 112 112 113 113 == Changelog == 114 115 = 2.5.3.1 = 116 * Fix variable product attribute issue. 117 * Fix variable product description issue. 118 * Support latest version of WooCommerce 4.0.1. 119 * Fix bulk sync/unsync not work properly. 120 * Fix auto sync deleted product issue. 121 122 123 = 2.5.3 = 124 * minor bug fixes. 125 * Support latest version of WooCommerce. 114 126 115 127 = 2.5.2 = -
woo-to-facebook-shop/trunk/uninstall.php
r2155447 r2276958 1 1 <?php 2 3 2 if( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) exit(); 4 // Delete table and option when plugin delete 5 global $wpdb; 6 $table_name = $wpdb->prefix . 'wctofb'; 7 $sql = "DROP TABLE IF EXISTS $table_name"; 8 $wpdb->query($sql); 9 delete_option('wctofb_api'); 10 delete_option('wctofb_apikey_success'); 11 delete_option('wctofb_runonce'); 12 delete_option('wctofb_pg_version'); 3 $wctofb_site_url = 'https://fbshop.premium-themes.co'; 4 // remove user fanpage and store from premium themes.co as user uninstall the plugin 5 $wctofb_api = esc_attr(get_option('wctofb_api')); 6 if(!empty($wctofb_api)){ 7 $jsondata = array("apikey"=>$wctofb_api,"action"=>"delete"); 8 $sendjson = json_encode($jsondata); 9 $url = $wctofb_site_url."/apicalls/wp/plugin_delete"; 10 $apisucces = wp_remote_post( $url, array( 11 'headers' => array( 'Content-Type' => 'application/json' ), 12 'method' => 'POST', 13 'timeout' => 200, 14 'redirection' => 5, 15 'httpversion' => '1.0', 16 'blocking' => true, 17 'sslverify'=> true, 18 'body' => $sendjson, 19 'cookies' => array()) ); 20 } 21 $apiresponse = $apisucces['body']; 22 $apimessage = json_decode($apiresponse); 23 $apimessage = (int)$apimessage->{'message'}; 24 // Delete table and option when plugin delete 25 global $wpdb; 26 $table_name = $wpdb->prefix . 'wctofb'; 27 $sql = "DROP TABLE IF EXISTS $table_name"; 28 $wpdb->query($sql); 29 delete_option('wctofb_api'); 30 delete_option('wctofb_apikey_success'); 31 delete_option('wctofb_runonce'); 32 delete_option('wctofb_pg_version'); -
woo-to-facebook-shop/trunk/wctofb.php
r2155447 r2276958 5 5 Description: Now you can start your facebook shop free. With WooCommerce to facebook shop plugin you can easily sync or unsync your products from your woocommerce website to your facebook fan page very quickly. No manual import or Export required everything in real time. 6 6 Author: premiumthemes 7 Version: 2.5. 37 Version: 2.5.4 8 8 Author URI: https://www.premium-themes.co/ 9 WC requires at least: 2.0.0 10 WC tested up to: 4.0.1 9 11 */ 10 12 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 11 define ('wctofb_version', '2.5. 3');13 define ('wctofb_version', '2.5.4'); 12 14 // Global Variables 13 15 global $bulk_action; … … 15 17 $wctofb_register = 'https://www.premium-themes.co'; 16 18 $wctofb_site_url = 'https://fbshop.premium-themes.co'; 17 18 19 /****** Stop plugin activation untill woocommerce is not activated ******/ 19 20 add_action( 'admin_init', 'wctofb_child_plugin_has_parent_plugin' ); … … 26 27 } 27 28 } 28 29 29 /****** Check WooCommerce installed and Active so WCtoFB plugin could get installed ******/ 30 30 function wctofb_woocommerce_exists() { … … 33 33 if (!$run_once){ // for very first installation.?> 34 34 <div class="notice notice-info "><p> 35 <?php _e( '<strong> Social Commerce for WooCommerce</strong>: plugin has been activated. The Installed version is '.wctofb_version, 'WCtoFB' ); update_option( "wctofb_pg_version", wctofb_version );?>35 <?php _e( '<strong>Woocommerce to Facebook Shop</strong>: plugin has been activated. The Installed version is '.wctofb_version, 'WCtoFB' ); update_option( "wctofb_pg_version", wctofb_version );?> 36 36 </p></div> 37 37 <?php update_option('wctofb_runonce',true); … … 44 44 // WooCommerce is not yet installed. ?> 45 45 <div class="notice notice-error is-dismissible"><p> 46 <?php _e('<strong> Social Commerce for WooCommerce</strong>: required plugin WooCommerce is Missing. <a href="'. esc_url( network_admin_url('plugin-install.php?s=WooCommerce&tab=search' ) ) .'" title="Install WooCommerce">Click here</a> to Install & Activate.', 'WCtoFB' );?>46 <?php _e('<strong>Woocommerce to Facebook Shop</strong>: required plugin WooCommerce is Missing. <a href="'. esc_url( network_admin_url('plugin-install.php?s=WooCommerce&tab=search' ) ) .'" title="Install WooCommerce">Click here</a> to Install & Activate.', 'WCtoFB' );?> 47 47 </p></div> 48 48 <?php } 49 49 } 50 50 add_action( 'admin_notices', 'wctofb_woocommerce_exists' ); 51 52 51 /****** Integrate settings links on plugin page on activation ******/ 53 52 if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))){ … … 62 61 } 63 62 } 64 65 63 /****** Create option when plugin install ******/ 66 64 function wctofb_install(){ … … 84 82 } 85 83 register_activation_hook(__FILE__,'wctofb_install'); 86 87 84 function wctofb_recurrence_interval( $schedules ) { 88 85 … … 95 92 } 96 93 add_filter( 'cron_schedules', 'wctofb_recurrence_interval' ); 97 98 94 function wctofbcronstarter_activation() { 99 95 if( !wp_next_scheduled( 'wctofbcronjob' ) ) { … … 103 99 } 104 100 register_activation_hook(__FILE__, 'wctofbcronstarter_activation'); 105 106 101 function wctofb_repeat_function() { 107 102 global $wpdb; global $post; … … 131 126 } 132 127 add_action ('wctofbcronjob', 'wctofb_repeat_function'); 133 134 128 /****** Create WCtoFB tab under woocommerce setting ******/ 135 129 if( is_admin() && ! empty ( $_SERVER['PHP_SELF'] ) && 'upload.php' !== basename( $_SERVER['PHP_SELF'] ) ) { … … 165 159 ?> 166 160 <div class="notice notice-error is-dismissible first_time"><p> 167 <?php _e( 'Please <a href="' . esc_url( $wctofb_register.'/setup-wizard/' ) . '" title=" Social Commerce for WooCommerce" target="_blank">Register here</a> to obtain your API key & enable the Facebook Shop.', 'wctofb' );?>161 <?php _e( 'Please <a href="' . esc_url( $wctofb_register.'/setup-wizard/' ) . '" title="Woocommerce to Facebook Shop" target="_blank">Register here</a> to obtain your API key & enable the Facebook Shop.', 'wctofb' );?> 168 162 </p></div> 169 163 <?php } 170 164 if(esc_attr( get_option('wctofb_apikey_success')) == "1" ){ ?> 171 <p><?php echo '<a href="'.esc_url( $wctofb_site_url.'/my-account/fan-page').'" title=" Social Commerce for WooCommerce" target="_blank"><img src="'.plugins_url( "images/Starter.jpg", __FILE__).'"></a>';?></p>165 <p><?php echo '<a href="'.esc_url( $wctofb_site_url.'/my-account/fan-page').'" title="Woocommerce to Facebook Shop" target="_blank"><img src="'.plugins_url( "images/Starter.jpg", __FILE__).'"></a>';?></p> 172 166 <a href="<?php echo $wctofb_site_url;?>/my-account/fan-page?sync=now" target="_blank"><img src="<?php echo plugins_url( "images/button-sync.jpg", __FILE__ );?>" ></a> 173 167 <?php 174 168 175 169 } elseif(esc_attr( get_option('wctofb_apikey_success')) == "2" ){ ?> 176 <p><?php echo '<a href="'.esc_url( $wctofb_site_url.'/my-account/fan-page').'" title=" Social Commerce for WooCommerce" target="_blank"><img src="'.plugins_url( "images/Pro.jpg", __FILE__).'"></a>';?></p>170 <p><?php echo '<a href="'.esc_url( $wctofb_site_url.'/my-account/fan-page').'" title="Woocommerce to Facebook Shop" target="_blank"><img src="'.plugins_url( "images/Pro.jpg", __FILE__).'"></a>';?></p> 177 171 <a href="<?php echo $wctofb_site_url;?>/my-account/fan-page?sync=now" target="_blank"><img src="<?php echo plugins_url( "images/button-sync.jpg", __FILE__ );?>" ></a> 178 172 <?php 179 173 } 180 174 elseif(esc_attr( get_option('wctofb_apikey_success')) == "3" ){ ?> 181 <p><?php echo '<a href="'.esc_url( $wctofb_site_url.'/my-account/fan-page').'" title=" Social Commerce for WooCommerce" target="_blank"><img src="'.plugins_url( "images/Premium.jpg", __FILE__).'"></a>';?></p>175 <p><?php echo '<a href="'.esc_url( $wctofb_site_url.'/my-account/fan-page').'" title="Woocommerce to Facebook Shop" target="_blank"><img src="'.plugins_url( "images/Premium.jpg", __FILE__).'"></a>';?></p> 182 176 <a href="<?php echo $wctofb_site_url;?>/my-account/fan-page?sync=now" target="_blank"><img src="<?php echo plugins_url( "images/button-sync.jpg", __FILE__ );?>" ></a> 183 177 <?php … … 235 229 <?php }elseif ($wctofb_apikey_success == "5" ){ ?> 236 230 <div class="updated notice is-dismissible"><p> 237 <?php _e('API key activate successfully. <a href="' . esc_url( $wctofb_site_url.'/my-account/fan-page' ) . '" title=" Social Commerce for WooCommerce" target="_blank">Click here</a> to complete the process.', 'wctofb' ); ?>231 <?php _e('API key activate successfully. <a href="' . esc_url( $wctofb_site_url.'/my-account/fan-page' ) . '" title="Woocommerce to Facebook Shop" target="_blank">Click here</a> to complete the process.', 'wctofb' ); ?> 238 232 </p></div> 239 233 <?php }elseif ($wctofb_apikey_success == "" ){ ?> 240 234 <div class="notice notice-error is-dismissible"><p> 241 <?php _e( 'Please <a href="' . esc_url( $wctofb_site_url.'/my-account/' ) . '" title=" Social Commerce for WooCommerce" target="_blank">Register here</a> to obtain your API key & enable the Facebook Shop plugin.', 'wctofb' );?>235 <?php _e( 'Please <a href="' . esc_url( $wctofb_site_url.'/my-account/' ) . '" title="Woocommerce to Facebook Shop" target="_blank">Register here</a> to obtain your API key & enable the Facebook Shop plugin.', 'wctofb' );?> 242 236 </p></div> 243 237 <?php } … … 268 262 WC_Settings_Tab_Wctofb::wctofb_init(); 269 263 } 270 271 264 /****** plugin css ******/ 272 265 function load_wctofb_wp_admin_style($hook) { … … 274 267 } 275 268 add_action( 'admin_enqueue_scripts', 'load_wctofb_wp_admin_style' ); 276 277 278 269 /****** Action for json generate and send product on facebook******/ 279 270 add_action( 'init', function(){ 280 271 global $wp_rewrite; 281 add_rewrite_endpoint('woocommerce_wctofb_feeds',array(EP_PERMALINK, EP_PAGES) );282 add_rewrite_endpoint( 'woocommerce_wctofb_feeds', EP_ALL );272 add_rewrite_endpoint('woocommerce_wctofb_feeds',array(EP_PERMALINK, EP_PAGES),true); 273 add_rewrite_endpoint( 'woocommerce_wctofb_feeds', EP_ALL ,true); 283 274 $wp_rewrite->flush_rules(); 284 275 } ); … … 290 281 } 291 282 }); 292 293 283 add_filter( 'request', function($vars=array()){ 294 284 if(isset ( $vars['woocommerce_wctofb_feeds'] ) && empty ( $vars['woocommerce_wctofb_feeds'] )){ … … 297 287 return $vars; 298 288 }); 299 300 301 289 /****** Action for show sync or unsync columns head in admin ******/ 302 290 function wctofb_products_extra_columns($columns){ … … 318 306 add_filter("manage_edit-product_columns", "wctofb_products_extra_columns"); 319 307 } 320 321 308 /****** Show sync or unsync in front of each product in admin ******/ 322 309 function wctofb_products_extra_columns_content($column){ … … 353 340 add_action("manage_posts_custom_column", "wctofb_products_extra_columns_content"); 354 341 } 355 356 342 /****** Sync and Unsync add on product bulk action ******/ 357 343 if(esc_attr( get_option('wctofb_apikey_success')) =="1" || esc_attr( get_option('wctofb_apikey_success')) =="2" || esc_attr( get_option('wctofb_apikey_success')) =="3"){ … … 387 373 } 388 374 } 389 390 391 375 add_action('load-edit.php', 'wctofb_facebook_bulk_action'); 392 376 function wctofb_facebook_bulk_action() { … … 432 416 if(($product->is_type( 'simple' ) || $product->is_type( 'external' )) && $product->get_regular_price()!='' && $poststatus=='publish' && $bulk_action == 'sync'){ 433 417 array_push($syncarray,$product_id); 434 $results_check = $wpdb->get_results( "SELECT * FROM $table_name WHERE product_id='$product_id'", OBJECT );435 if(count($results_check) == 0){436 $wpdb->insert( $table_name, array( 'product_id' => esc_sql($product_id),'product_status' => 'sync'));437 }438 else{439 $wpdb->update( $table_name, array( 'product_status' => 'sync'),array( 'product_id' => esc_sql($product_id)) );440 }441 418 } 442 419 elseif($product->is_type( 'variable' ) && $product->get_variation_regular_price('min',true)!='' && $poststatus=='publish' && $bulk_action == 'sync' ){ 443 420 array_push($syncarray,$product_id); 444 $results_check = $wpdb->get_results( "SELECT * FROM $table_name WHERE product_id='$product_id'", OBJECT );445 if(count($results_check) == 0){446 $wpdb->insert( $table_name, array( 'product_id' => esc_sql($product_id),'product_status' => 'sync'));447 }448 else{449 $wpdb->update( $table_name, array( 'product_status' => 'sync'),array( 'product_id' => esc_sql($product_id)) );450 }451 421 } 452 422 elseif($product->is_type( 'grouped' ) && $poststatus=='publish' && $bulk_action == 'sync' ){ 453 423 array_push($syncarray,$product_id); 454 $results_check = $wpdb->get_results( "SELECT * FROM $table_name WHERE product_id='$product_id'", OBJECT );455 if(count($results_check) == 0){456 $wpdb->insert( $table_name, array( 'product_id' => esc_sql($product_id),'product_status' => 'sync'));457 }458 else{459 $wpdb->update( $table_name, array( 'product_status' => 'sync'),array( 'product_id' => esc_sql($product_id)) );460 }461 424 } 462 425 elseif(($product->is_type( 'simple' ) || $product->is_type( 'external' ) || $product->is_type( 'variable' )|| $product->is_type( 'grouped' )) && $bulk_action == 'unsync'){ 463 $unsyncarray[] = array('product_id'=>$product_id); 464 $wpdb->update( $table_name, array( 'product_status' => 'unsync'),array( 'product_id' => esc_sql($product_id)) ); 426 array_push($unsyncarray,$product_id); 465 427 } 466 428 } … … 476 438 if ($bulk_action == 'unsync' || $bulk_action == 'sync'){ 477 439 if ( $response == 'success' ) { 440 if(!empty($syncarray)){ 441 foreach($syncarray as $syncsingle){ 442 $results_check = $wpdb->get_results("SELECT * FROM $table_name WHERE product_id='$syncsingle'", OBJECT ); 443 if(count($results_check) == 0){ 444 $wpdb->insert( $table_name, array( 'product_id' => esc_sql($syncsingle),'product_status' => 'sync')); 445 } 446 else{ 447 $wpdb->update( $table_name, array( 'product_status' => 'sync'),array( 'product_id' => esc_sql($syncsingle)) ); 448 } 449 } 450 } 451 if(!empty($unsyncarray)){ 452 foreach($unsyncarray as $unsyncsingle){ 453 $wpdb->update($table_name,array('product_status'=>'unsync'),array('product_id'=>esc_sql($unsyncsingle))); 454 } 455 } 478 456 setcookie( "singleproductupdate",'success'); 479 457 }else{ … … 533 511 } 534 512 add_action('wp_trash_post', 'wctofb_trash_function'); 535 536 513 /****** Remove product from facebook shop on product move to draft, pending, private, schedule, publish ******/ 537 514 function wctofb_func_Save( $post_id ) { … … 609 586 add_action( 'save_post', 'wctofb_func_Save', 10); 610 587 add_action( 'wp_insert_post' , 'wctofb_func_Save' , '99', 2 ); 611 612 588 /****** Action for json generate and send product on facebook******/ 613 589 function wctofb_sync_button_action($jsonaction,$productsarray){ … … 703 679 $allimages[] = array("srcurl"=>wp_get_attachment_url( $attachment_id ),"isthumb"=>"0","islarge"=>"0","isgallery"=>"1","isvariation"=>"0",'variation_id'=>"0"); 704 680 } 705 706 681 } 707 682 … … 849 824 $product_short_description = preg_replace("/\[(.*?)\]/i",'',apply_filters( 'the_excerpt', get_the_excerpt())); 850 825 $product_long_description = preg_replace("/\[(.*?)\]/i", '', apply_filters( 'the_content', get_the_content())); 851 $product_long_description = preg_replace("/\[(.*?)\]/i", '', get_the_content());852 826 $featured_image_small = wp_get_attachment_image_src( get_post_thumbnail_id($product_id), 'medium', false, '' ); 853 827 $featured_image_large = wp_get_attachment_image_src( get_post_thumbnail_id($product_id), 'full', false, '' ); … … 936 910 return $apimessage; 937 911 } 938 939 912 /****** auto update the api status******/ 940 913 function wctofb_updatestatus_func( WP_REST_Request $request ) { … … 978 951 ) ); 979 952 } 980 981 953 /****** auto update product status when product delete on facebook******/ 982 954 function wctofb_updateproductdeletestatus_func( WP_REST_Request $request ) { … … 1020 992 ) ); 1021 993 } 1022 1023 994 /****** Run a process update plugin data ******/ 1024 995 function wctofb_update_db_check() { -
woo-to-facebook-shop/trunk/wctofb_woocommerce_feeds.php
r2154149 r2276958 2 2 /*** wctofb_woocommerce_feeds.php ***/ 3 3 if ( ! defined( 'ABSPATH' ) ) exit; 4 5 4 global $wctofb_site_url, $wpdb ,$post; $productids=array(); 6 5 define('DONOTCACHEPAGE', TRUE); … … 36 35 exit(); 37 36 } 38 $productid_results = $wpdb->get_results( "SELECT product_id FROM $table_name WHERE sync_status='0' AND (product_status='sync' OR product_status='unsync') LIMIT $productlimit", ARRAY_A );37 $productid_results = $wpdb->get_results( "SELECT product_id FROM $table_name WHERE sync_status='0' AND (product_status='sync' OR product_status='unsync') LIMIT $productlimit", ARRAY_A ); 39 38 if(!empty($productid_results)){ 40 39 if(!empty($singleproductid)){ … … 46 45 } 47 46 $my_query = query_posts(array('post__in' => $productids ,'post_type'=> 'product', 'post_status' => 'publish','order'=>'ASC','posts_per_page' => -1 )); 47 if ( have_posts() ) : 48 48 while (have_posts()): the_post(); 49 49 global $product; $attributes=$allattributes=$allvariations=$product_stock_status=$productrawvariations=$producttype=$childproductsids=$cat_name=$allimages=$product_sku=$product_stock_quantity=$product_stock_manage=$product_stock_backorders=$product_stock_sold_individually=$product_weight=$product_length=$product_height=$product_width=$regularprice=$saleprice=$product_long_description=$product_short_description=$product_detail_link=$product_title=$product_id=''; … … 116 116 $allimages[] = array("srcurl"=>wp_get_attachment_url( $attachment_id ),"isthumb"=>"0","islarge"=>"0","isgallery"=>"1","isvariation"=>"0",'variation_id'=>"0"); 117 117 } 118 119 118 } 120 119 … … 138 137 } 139 138 } 140 if(empty($singleproductid) ){139 if(empty($singleproductid) && !isset($_SERVER['HTTP_COOKIE'])){ 141 140 $wpdb->update( $table_name, array( 'product_status' => 'sync','sync_status'=>'1'),array( 'product_id' => esc_sql($product_id)) ); 142 141 } … … 214 213 } 215 214 $regularprice = min(array_filter($child_prices)); 216 if(empty($singleproductid) ){215 if(empty($singleproductid) && !isset($_SERVER['HTTP_COOKIE'])){ 217 216 $wpdb->update( $table_name, array( 'product_status' => 'sync','sync_status'=>'1'),array( 'product_id' => esc_sql($product_id)) ); 218 217 } … … 321 320 $productrawvariations['variation_dropdown']= array(); 322 321 array_push($productrawvariations['variation_dropdown'],$attributes); 323 if(empty($singleproductid) ){322 if(empty($singleproductid) && !isset($_SERVER['HTTP_COOKIE'])){ 324 323 $wpdb->update( $table_name, array( 'product_status' => 'sync','sync_status'=>'1'),array( 'product_id' => esc_sql($product_id)) ); 325 324 } … … 328 327 $sendstoreproducts[] = array('product_id'=> $product_id,'product_sku'=>htmlspecialchars($product_sku),'product_title'=> htmlspecialchars($product_title),'product_short_description'=> htmlspecialchars($product_short_description),'product_long_description'=> htmlspecialchars($product_long_description),'regularprice'=> $regularprice,'saleprice'=> $saleprice,'product_detail_link'=> $product_detail_link,'allimages'=> $allimages,'productrawvariations'=>$productrawvariations, 'cat_name'=> $cat_name, 'product_stock_status'=>$product_stock_status,'product_stock_manage'=>$product_stock_manage,'product_stock_quantity'=>$product_stock_quantity,'product_stock_backorders'=>$product_stock_backorders,'product_stock_sold_individually'=>$product_stock_sold_individually,'product_weight'=>$product_weight,'product_length'=>$product_length,'product_height'=>$product_height,'product_width'=>$product_width,'producttype'=>$producttype,'groupedproduct_ids'=>$childproductsids);} 329 328 endwhile; 329 else: 330 foreach($productids as $removedproid){ 331 $wpdb->delete( $table_name, array( 'product_id' => $removedproid ) ); 332 } 333 endif; 330 334 $jsondata = array("action"=>"Store Feed","products"=>$sendstoreproducts,'store_url'=>$store_url,'cartpage_url'=>$cartpage_url,"store_currency"=>$store_currency,"store_weight_unit"=>esc_attr( get_option('woocommerce_weight_unit' ) ),"store_dimension_unit"=>esc_attr( get_option('woocommerce_dimension_unit')),"store_language"=>$store_language,"apikey"=>"verified"); 331 335
Note: See TracChangeset
for help on using the changeset viewer.