chrisonhismac
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [JSON API] Getting data from Woocommerce PageI changed the function called set_custom_fields_value in models->post.php to the following.
Now if you add ?json=1&custom_fields=all after the url it will return ALL custom values including woo data – make sure you want all the field returned!
function set_custom_fields_value() { global $json_api; if ($json_api->include_value('custom_fields') && $json_api->query->custom_fields) { if($json_api->query->custom_fields == 'all') { $wp_custom_fields = get_post_custom($this->id); $this->custom_fields = new stdClass(); foreach ( $wp_custom_fields as $key => $value ){ $this->custom_fields->$key = $value; } } else { $keys = explode(',', $json_api->query->custom_fields); $wp_custom_fields = get_post_custom($this->id); $this->custom_fields = new stdClass(); foreach ($keys as $key) { if (isset($wp_custom_fields[$key])) { $this->custom_fields->$key = $wp_custom_fields[$key]; } } } } else { unset($this->custom_fields); } }
[Please post code between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Forum: Plugins
In reply to: [Cache Images] [Plugin: Cache Images] Error getting some imageUpon further inspection – it may be the ajax request timing out due to the number of images im trying to pull in
Forum: Plugins
In reply to: [Cache Images] [Plugin: Cache Images] Error getting some imageSeems to have something to do with this
function cacheall(domain,domainmd5) { jQuery("#cache_images_" + domainmd5).attr("disabled", true); setMessage("Reading posts..."); jQuery.ajax({ url: ajaxurl, type: "POST", //contentType: "application/json", data: "action=cache_images&do=getalllist&domain=" + domain, success: function(result) { var list = eval(result); -----> var curr = 0;
Viewing 3 replies - 1 through 3 (of 3 total)