westbrasil
Forum Replies Created
-
From now, only admin dashboard display errors. Frontend all ok, no warnings.
wp-admin:
Theres ha been a critical error on your website. Please check…Thank you for your attention. I performed new tests in local environment and the problem is exactly an incompatibility between woocommerce latest version + wpml latest version + string translator latest version + marketking latest version.
Technically, there are no errors from the first three plugins, but when I activate marketking there is an infinite loop in php whose messages are absolutely conflicting – e.g. it points to wordpress core, points to functions of the theme (tested with others tmb) and to other errors.
a few days ago wpml released a version to fix vulnerabilities, woocommerce released an updated version and wordpress released 6.1; only the marketking version produces the error.
before the last marketking update the error occurred exclusively in the woocommerce order split.
thanks
Hi! the error persists (at the first attempt all ok, after disable and enable wpml or marketking the error persists. no cache an several attempts to check this information)
I noticed that the incompatibility -although there is no php warning about- is related to a possible incompatibility with WPML (even if woocommerce does not use it in this checkout page. I still haven’t investigated enough to understand whycheckout there is this incompatibility with MarketKing.
This file> /wp-content/plugins/marketking-multivendor-marketplace-for-woocommerce/public/class-marketking-core-public.php in line 235 split user order and create a fatal error.
But debug dont show any incompatibility by wpml. If disable wpml in entire site, Marketking can make a order complete.
Any solution -or patch- for this incompatibility?
Thanks.
In debug info,
>>
PHP Fatal error: Uncaught Error: Call to a member function get_id() on null in /xxxxxxx/wp-content/plugins/marketking-multivendor-marketplace-for-woocommerce/public/class-marketking-core-public.php:235
>>> this linesfunction filter_new_order_email_recipient( $recipient, $order ){
// change the email recipient to be the vendorif (marketking()->is_suborder($order->get_id())){
// get vendor email
$recipient = marketking()->get_vendor_email(marketking()->get_order_vendor($order->get_id()));
} else if (!marketking()->is_multivendor_order($order->get_id())){
// not suborder, but vendor order (just 1 vendor)
$recipient = marketking()->get_vendor_email(marketking()->get_order_vendor($order->get_id()));}
// for the “new order” email sent to admin (for the composite order), do not send it
if (marketking()->is_multivendor_order($order->get_id())){
// unless specifically set via filter, disable it.
if (!apply_filters(‘marketking_enable_new_order_email_composite’, false)){
$recipient = ”;
}
}Forum: Plugins
In reply to: [Advanced Order Export For WooCommerce] Export button by productWe have no professional programmer so far.
Thanks for listening us!Forum: Plugins
In reply to: [Advanced Order Export For WooCommerce] Export button by productThanks for reply
If I edit code for call ajax-admin nothing happen,if( is_super_admin() ) echo '<a href="' . wp_nonce_url( admin_url( 'edit.php?post_type=product&action=export_orders&post=' . $post->ID ), 'export-orders-product_' . $post->ID ) . '" rel="permalink">' . esc_html__( 'Export Orders', 'woocommerce' ) . '</a>'; } );to
‘?post_type=product&action=export_orders&post=’ . $post->ID ), ‘export-orders-product_’ . $post->ID )
. ‘” rel=”permalink”>’ . esc_html__( ‘Export Orders’, ‘woocommerce’ ) . ‘‘;
} );`or
‘ajax-admin?post_type=product&action=export_orders&post=’ . $post->ID ), ‘export-orders-product_’ . $post->ID )
. ‘” rel=”permalink”>’ . esc_html__( ‘Export Orders’, ‘woocommerce’ ) . ‘</a>’;
} );`If I set permission to access link generated (mysite.com/wp-admin/edit.php?post_type=product&action=export_orders&post=10 ) is possible to generate export for another user roles, like managers, sellers, etc?
Thanks
Forum: Plugins
In reply to: [Advanced Order Export For WooCommerce] Export button by productThanks for reply,
I dont understand: if I remove wp_nonce_url a error occured. but if a alternate URL to something like: admin_url( ‘?post_type=product&action=export_orders&post=’ . $post->ID ) and create a button nothing happen. I dont export in frontend or any other place.This link structure (/wp-admin/edit.php?post_type=product&action=export_orders&post=—ID—) could be used in the frontend like a simple edit?
Sorry, i didn’t understand how i can use it in other places or edit function.
For example, this function provide a link Export (Export Button) in a backend and frontend or any other place. Or… a form to submit a export.
Or, what the permission for that?
- This reply was modified 6 years, 3 months ago by westbrasil.
- This reply was modified 6 years, 3 months ago by westbrasil.
Thank you!!!
It is perfect.Thanks!
Hi, thanks for the reply,
In this case, it is like this solution:
(for example, export by order:)
add_filter( 'woocommerce_admin_order_actions', function ( $actions, $order ) { $actions['export'] = array( 'url' => wp_nonce_url( admin_url( 'admin-ajax.php?action=order_exporter&method=export_download_bulk_file&export_bulk_profile=now&ids=' . $order->get_id() ), 'woocommerce' ), 'name' => __( 'Export', 'woocommerce' ), 'action' => 'export', ); return $actions; },10,2); add_action( 'admin_head',function () { echo '<style>.wc-action-button-export::after { font-family: woocommerce !important; content: "\e029" !important; }</style>'; });Now, for this question, the button is possible a icon to export all orders by one (only one) product, ignoring another orders, for example:
PRODUCT LIST PAGE WOOCOMMERCE>
PRODUCT A (button export)
PRODUCT B (button export) – ON CLICK export all order by B
PRODUCT C (button export)
PRODUCT D (button export)If one order has two different products, A + B, its possible export exclude A?
In my case, my woocommerce only has orders by only one product by time.Thanks