fractalmask
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Media uploader creating hundreds of attachment entriesI found that this problem is not unique, its with other users too.
Forum: Fixing WordPress
In reply to: Media uploader creating hundreds of attachment entriesOther problem along with this is here
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] Custom User RolesHi Andrei,
please update the plugin that gets all possible conditions to work with this good plugin.
I tried this but its not working as expected
add_filter( 'if_menu_conditions', 'custom_if_menu_conditions' ); function custom_if_menu_conditions( $conditions ) { foreach (get_editable_roles() as $role_name => $role_info){ $conditions[] = array( 'name' => $role_info['name'], 'condition' => function() { global $current_user; if( is_user_logged_in() ) return in_array( $role_name, $current_user->roles ); return false; } ); } return $conditions; }
Forum: Plugins
In reply to: [WooCommerce Custom Currencies] Paypal Payment error: Currencies do not matchGalalAly, I’ve sent you a file .. please check it.
Forum: Plugins
In reply to: [WooCommerce Custom Currencies] Paypal Payment error: Currencies do not matchmaybe something like this
add_filter (‘woocommerce_payment_complete_order_status’, ‘my_change_status_function’); function my_change_status_function ($order_id) { $order = new WC_Order($order_id); //Do whatever additional logic you like before…. return ‘completed'; }
reference : https://chrislema.com/automating-woocommerce-order-status-changes/
Forum: Plugins
In reply to: [WooCommerce Custom Currencies] Paypal Payment error: Currencies do not matchI need something like :
if $order->get_order_currency() is-not-equals-to $posted['mc_currency'] then check if the $posted['amt'] value returned by paypal is-equals-to ( value of product x conversion rate ) tell woocommerce order that this is ok to have $order->update_status is everything fine
Forum: Plugins
In reply to: [WooCommerce Custom Currencies] Paypal Payment error: Currencies do not matchWC checks things here
woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php line:786
// Validate currency if ( $order->get_order_currency() != $posted['mc_currency'] ) { if ( 'yes' == $this->debug ) { $this->log->add( 'paypal', 'Payment error: Currencies do not match (sent "' . $order->get_order_currency() . '" | returned "' . $posted['mc_currency'] . '")' ); } // Put this order on-hold for manual checking $order->update_status( 'on-hold', sprintf( __( 'Validation error: PayPal currencies do not match (code %s).', 'woocommerce' ), $posted['mc_currency'] ) ); exit; }
Forum: Plugins
In reply to: [WooCommerce Custom Currencies] Paypal Payment error: Currencies do not matchHi GalalAly,
Your plugin is fantastic added stars in plugin review.
hopefully we’ll have some improvement.
—
Added currency : ‘VND’
the local payment gateway will accept it (requires plugin) and its goodWth Paypal
VND is changed to USD, paypal transaction completes successfully but WC updates status as'on-hold', 'Validation error: PayPal currencies do not match (code %s).'
WC Log shows this
Payment error: Currencies do not match (sent "VND" | returned "USD")
WC thinks it had actually sent VND and got USD in return.
Is WC aware that ‘VND’ was converted to ‘USD’ ?Forum: Plugins
In reply to: [WooCommerce] Order status: on-holdadmin > woocommerce > settings > Checkout > Paypal
use same email address on these fields
PayPal Email
Receiver EmailForum: Plugins
In reply to: Woocommerce validation errorhave you solved it