borie88
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Query a CPT by meta using the core rest APIIn the REST developer’s handbook it says,
When the REST API was merged into WordPress core the ?filter query parameter was removed to prevent future compatibility and maintenance issues. The ability to pass arbitrary WP_Query arguments to the API using a ?filter query parameter was necessary at the genesis of the REST API project, but most API response filtering functionality has been superseded by more robust query parameters like ?categories=, ?slug= and ?per_page=.
First-party query parameters should be used whenever possible. However, the rest-filter plugin restores the ability to pass arbitrary ?filter values in API request if needed.
I think this documentation really needs to be updated. There are only 3 quick examples of “more robust query parameters,” but no link to a full list of whatever the filter has been replaced with.
For now, I have just added an IF statement below everything in the custom-redirection.php file to modify the _wp_original_http_referer input that is added to check if the referrer is the registration page or not… Works, but seems hacky, is there a better way to do this?
public function login_form() { if ( ! empty( $_REQUEST['redirect_to'] ) ) { $referer = wp_unslash( $_REQUEST['redirect_to'] ); } elseif ( wp_get_original_referer() ) { $referer = wp_get_original_referer(); } else { $referer = Theme_My_Login::is_tml_page() ? wp_get_referer() : wp_unslash( $_SERVER['REQUEST_URI'] ); } if (($_REQUEST['redirect_to'] === wp_registration_url()) || (wp_get_original_referer() === wp_registration_url()) || (wp_get_referer() === wp_registration_url())) { $referer = get_home_url(); } echo '<input type="hidden" name="_wp_original_http_referer" value="' . esc_attr( $referer ) . '" />'; }
It’s been almost a year!
The awesome snippet provided above doesn’t work in newer versions of WC + WCML. It throws a bunch of errors. I found the solution on the WPML forums (actually karolwaszak also provided the solution, so just relaying it here just in case)
You must change this line:
$get_current_currency = $woocommerce_wpml->multi_currency_support->get_client_currency();
to this
$get_current_currency = $woocommerce_wpml->multi_currency->get_client_currency();
How did 2 weeks become 5 months? What’s the status on this? There’s huge potential to open your plugin up to 1+ billion more people who all use WeChat/QQ/etc.
Nope. Its been disabled the whole time, yet CSS and JS for everything loads
Forum: Plugins
In reply to: [WooCommerce] Display Woocommerce Orders for specific authorIf it were a vendor, they’d create a product, that product would be linked to them as a vendor (not necessarily author), they would control this product, and they would see orders which contain this product.
Exactly. I’m cutting out the step of making them a vendor and letting them create products regardless.
Forum: Plugins
In reply to: [WooCommerce] Display Woocommerce Orders for specific authorBetter yet, is there a way to get the author id for a product of an order with a shortcode so I can pass it into a query filter for the shop_order post type in Toolset Views? I tried using this:
function display_author_shortcode() { // Code $order = $order_id; $items = $order->get_items(); foreach ( $items as $item ) { $product_id = $item['product_id']; } $product_author_id = $product_id->post_author; return $product_author_id; } add_shortcode( 'product-author', 'display_author_shortcode' );
Thanks!
Forum: Plugins
In reply to: [WooCommerce] Display Woocommerce Orders for specific authorI thought vendors makes you create a ‘vendor’ first and then displays orders by vendor, regardless of the post author. That would be an extra step in this case because users would have to create a vendor for themselves first, correct?
Maybe a better question would be: how are orders linked to products? I found out they do not have a hierarchical relationship. Is there a custom field in each order linking it to the product?
Forum: Plugins
In reply to: [WooCommerce] Display Woocommerce Orders for specific authorSort of like vendors, except users can create products (tickets for events) through the frontend with a form, so they become the post author. I’d like for them to be able to see orders made from those products, so they know who is coming to their events.
Forum: Plugins
In reply to: [WooCommerce] Display Woocommerce Orders for specific authorWhat about for filtering order queries for the product author on the frontend?
Forum: Plugins
In reply to: [WooCommerce] Display Woocommerce Orders for specific authorI’m going to bring this back because I am interested too.
Is WeChat and QQ login in this version as well?
Hey, is there any update on this? We would also like WeChat login. I can also translate if you are having trouble. Thanks!
bump