danojonguitud
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] how Woocommerce calculates shipping?Yes, I’m building an ecomm app. But I actually don’t need the cart features since I’m using state management to control it.
What I’m looking to do is to create a rest api endpoint that gets the shipping address of the user and it returns the possible shipping methods.
I was looking at some woocommerce blocks that uses the endpoint /wc/store/cart/update-customer in the FetchAPI but looks like it depends on the Nonce with I actually don’t know how to create.
In any case, whatever hint to create this would be helpful.
Forum: Plugins
In reply to: [Password Reset with Code for WordPress REST API] compatibility with jwt authBtw, I fixed my problem with the email that was just a internal problem with my server SMTP, so please take in mind that someone is facing similar issues.
Forum: Plugins
In reply to: [Password Reset with Code for WordPress REST API] compatibility with jwt authThank you for your assistance and speed @dominic_ks, that is not common in WordPress Forums and i really appreciate that.
You are very right, I forgot about that the array will be overwritten and that’s not what I want. I will take your approach.
I decided to use plugin because I actually tried adding the snippet to the functions.php file but with no results.
I will edit my past comment so is not misleading for future references. Thanks a lot!
Forum: Plugins
In reply to: [Password Reset with Code for WordPress REST API] compatibility with jwt authHi, i was having the same issue regarding the JWT Auth plugin and this is what I did to fix the 403 error code. *Note that I haven’t fixed the issue with the email not being send yet.
To fix the problem with JWT Auth plugin you need to create a plugin with the whitelisting snipet.
So technically you need to create a folder a name like: JWT Whitelister inside the plugin wordpress folder.
Create a file called the same as your plugin folder name with .php extension
add the next code
<?php /** * The plugin bootstrap file * * This file is read by WordPress to generate the plugin information in the plugin * admin area. This file also includes all of the dependencies used by the plugin, * registers the activation and deactivation functions, and defines a function * that starts the plugin. * * @link swooncreative.ca * @since 1.0.0 * @package Jwt_Whitelister * * @wordpress-plugin * Plugin Name: JWT Whitelister * Plugin URI: swooncreative.ca * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area. * Version: 1.0.0 * Author: SwoonCreative * Author URI: swooncreative.ca * License: GPL-2.0+ * License URI: https://www.gnu.org/licenses/gpl-2.0.txt * Text Domain: jwt-whitelister * Domain Path: /languages */ /** * @snippet Whitelisting endpoints from JWT */ function whitelist_auth_endpoints( $endpoints ) { $endpoints[] = '/wp-json/bdpwr/v1/reset-password'; $endpoints[] = '/wp-json/bdpwr/v1/set-password'; $endpoints[] = '/wp-json/bdpwr/v1/validate-code'; return $endpoints; }; add_filter( 'jwt_auth_whitelist' , 'whitelist_auth_endpoints' , 10 , 1 );
Activate it and give it a try
if I find a solution for the email not being send I will let you know.
- This reply was modified 3 years, 11 months ago by danojonguitud. Reason: Code was edited as a reference of a comment that was providing in this comment thread