crea8xion
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Tax Rate Update@remi Corson
Thank you very much for the reply.
But I seem to be lost on how I can changed the $rate;
Array ( [57] => Array ( [rate] => 10 [label] => Measurement M [shipping] => yes [compound] => yes ) [34] => Array ( [rate] => 9.5 [label] => Sales Tax [shipping] => yes [compound] => yes ) [36] => Array ( [rate] => 4 [label] => Convenience Fee [shipping] => yes [compound] => yes ) )
I need to only changed the first array (rate => 10 of label => Measument M …);
Then apply the tax calculation.
Can you guide me through?
Thanks
Rob
Forum: Plugins
In reply to: [BLAZE Retail WooCommerce] Multisite ProblemI found the problem for multisite setup. Hope you update the plugin soon for multisite setup..
On line 727 on blaze-woo.php file
I added the multisite check for WooCommerce plugin if activated.
public function checkWC() {
if ( is_multisite() ) {
include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ );
if( is_plugin_active_for_network( ‘woocommerce/woocommerce.php’) ) return true;
}if (in_array(‘woocommerce/woocommerce.php’, apply_filters(‘active_plugins’, get_option(‘active_plugins’)))) {
return true;
} else {
return false;
}
}Forum: Plugins
In reply to: [Easy Category Icons] get_the_icon not working (please help)try this one – its working
<?php
$categories = get_terms( ‘listing’, array(
‘orderby’ => ‘count’,
‘hide_empty’ => 0
) );if ( ! empty( $categories ) && ! is_wp_error( $categories ) ) {
echo ‘<ul id=”categories”>’;
foreach ($categories as $term) {
$arr = templ_get_the_icon(array(‘size’ => apply_filters(‘templ_icon_size’,’small’)),$term->taxonomy,$term->term_id);
echo ‘- name ) ) . ‘”>
name .'”/>’ . $term->name . ‘
‘;
}
echo ‘‘;
}?>
- This reply was modified 7 years, 10 months ago by crea8xion.
Forum: Plugins
In reply to: [WordPress REST API (Version 2)] using transient_post_statushi Daniel,
Thank you very much,
I appreciate your teams effort to add this on wordpress core..
Forum: Plugins
In reply to: [WordPress REST API (Version 2)] Beta 9 – Categories ProblemOh — theres a typo on Changelog
its not categories but category ….
Forum: Plugins
In reply to: [WordPress REST API (Version 2)] Media UploadHi All,
I solve this problem and has nothing to do with wp rest api,
with the beta-2.8 just release I can now upload image to the server
using the media endpoints…Below is the code I used with okHttp which you can compile via
gradle >>> compile ‘com.squareup.okhttp:okhttp:2.6.0’OkHttpClient client = new OkHttpClient();
MediaType MEDIA_TYPE_JPG = MediaType.parse(“image/jpg”);File sourceFile = new File(filepath);
Uri uri = new Uri.Builder()
.scheme(protocol)
.authority(domain)
.path(“wp-json/wp/v2/media”)
.appendQueryParameter(“access_token”, accessToken)
.build();String serverUri = String.valueOf(uri);
String[] image = filepath.split(“/”);
int idx = image .length – 1;RequestBody requestBody = new MultipartBuilder()
.type(MultipartBuilder.FORM)
.addFormDataPart(“file”, image [idx], RequestBody.create(MEDIA_TYPE_JPG, sourceFile))
.build();Request request = new Request.Builder()
.url(serverUri)
.post(requestBody)
.build();Response response = null;
try {
response = client.newCall(request).execute();
} catch (IOException e) {
e.printStackTrace();
}Hope this helps…
Forum: Plugins
In reply to: [WordPress REST API (Version 2)] Media Uploadbtw
I’m using postman to generate the the 2nd code which is ok.
I can upload image using PostMan.
Forum: Plugins
In reply to: [WordPress REST API (Version 2)] Media UploadWhile this one is 500
MediaType mediaType = MediaType.parse(“multipart/form-data; boundary=—011000010111000001101001”);
RequestBody body = RequestBody.create(mediaType, “—–011000010111000001101001\r\nContent-Disposition: form-data; name=\”fileName\”; filename=”+ sourceFile +”\r\nContent-Type: image/jpeg\r\n\r\n\r\n—–011000010111000001101001–“);
Request request = new Request.Builder()
.url(serverUri)
.post(body)
.addHeader(“content-type”, “multipart/form-data; boundary=—011000010111000001101001”)
.addHeader(“content-disposition”, String.valueOf(sourceFile))
.addHeader(“cache-control”, “no-cache”)
.build();Forum: Plugins
In reply to: [WordPress REST API (Version 2)] Media UploadHi Daniel,
I use another method using OkHttp,
This one produces
E/Response: Response{protocol=http/1.1, code=400, message=Bad Request, url=”urlwithtoken”
RequestBody requestBody = new MultipartBuilder()
.type(MultipartBuilder.FORM)
.addPart(
Headers.of(“Content-Disposition”, “form-data; name=\”title\””),
RequestBody.create(null, q[idx]))
.addPart(
Headers.of(“Content-Disposition”, “form-data; name=\”image\””),
RequestBody.create(MEDIA_TYPE_JPG, sourceFile))
.build();Forum: Plugins
In reply to: [WordPress REST API (Version 2)] Enlighten me for media attachmentHi Daniel,
Thanks a lot..
It will be a great help for me..
Forum: Plugins
In reply to: [WordPress REST API (Version 2)] register route 404Sorry,
This is not 404, its working..
This works
https://example.com/wp-json/myplugin/v2/gcm/12345But returns me on [POST]
“No response received”
Forum: Plugins
In reply to: [WordPress REST API (Version 2)] Enlighten me for media attachmentHi Authors,
Can someone guide me through this problem?
Thanks.
Forum: Plugins
In reply to: [WordPress REST API (Version 2)] register route 404ok
Can I make a custom route that accepts arguments for inserting values to a custom table?
e.g.
register_rest_route( $this->namespace . $this->version, ‘/’ . $this->base . ‘/(?P<gcmid>[\d]+)’, array(
array(
‘methods’ => WP_REST_Server::READABLE,
‘callback’ => array($this, ‘my_awesome_func’),
‘permission_callback’ => null,
‘args’ => array(
‘id’ => array(
),
),
),
array(
‘methods’ => WP_REST_Server::CREATABLE,
‘callback’ => array( $this, ‘create_item’ ),
‘permission_callback’ => null,
‘args’ => array(
‘gcmid’ => array(
),
),
),
) );and the full route would be
https://example.com/wp-json/myplugin/v2/gcm/gcmid=12345
I still got 404…
Thanks..
Forum: Plugins
In reply to: [WordPress REST API (Version 2)] How to add category on create postHi Daniel,
Thanks a lot, i haven’t able to read all docs, its been there all the time.
Rob.
Forum: Fixing WordPress
In reply to: Visual Editor not savingyes switch themes to default, but still no effect
- name ) ) . ‘”>