ered15
Forum Replies Created
-
Forum: Plugins
In reply to: [Hide Login+] can't access wp-admin URLit’s not working, I try to open wp-admin and it redirects to domain.com, have u tested the plugin in last WP 4.3?
File:
yith-woocommerce-social-login\includes\hybridauth\Hybrid\Providers\Facebook.php
Line: 18
Forum: Plugins
In reply to: [WooCommerce] Redirect returning HTML instead of JSON/redirect.I tried, but it still outputs in HTML:
return wp_send_json (array( 'result' => 'success', 'redirect' => $this->get_return_url( $order ) ));
Forum: Plugins
In reply to: [WooCommerce] Redirect returning HTML instead of JSON/redirect.how can i make the plugin output/JSON?? I’ve been trying with no luck.
Forum: Plugins
In reply to: [WooCommerce] Impossible to make billing Postcode not requiredMy locale is ES and I don’t want it to be required, anyway I made it work using this code:
add_filter( 'woocommerce_default_address_fields', 'billing_postcode'); function billing_postcode( $address_fields ) { $address_fields['postcode']['required'] = false; return $address_fields; }
Thanks for ur Respond.
Forum: Plugins
In reply to: [WooCommerce] Flat Rate Shipping does not have additional options segmentHey Mike, quick question, how can i create multiple custom rates using the hook?
add_action( 'woocommerce_flat_rate_shipping_add_rate', 'add_another_custom_flat_rate', 10, 2 ); function add_another_custom_flat_rate( $method, $rate ) { $new_rate = $rate; $new_rate['id'] .= ':' . 'custom_rate_name'; // Append a custom ID $new_rate['label'] = 'Rushed Shipping'; // Rename to 'Rushed Shipping' $new_rate['cost'] += 2; // Add $2 to the cost // Add it to WC $method->add_rate( $new_rate ); }
Forum: Plugins
In reply to: [SN Rating] unexpected T_OBJECT_OPERATORUnfortunately, it is not possible to call a method on an object just created with new before PHP 5.4. This is PHP in a version from 5.4 ongoing:
EDIT: sn_rating.php
Replace:
$post = get_Post((new BP_Activity_Activity(bp_Get_Activity_Id()))->item_id);
WITH:
$BP_Activity = new BP_Activity_Activity(bp_Get_Activity_Id()); $post = $BP_Activity->item_id();
Replace:
echo (new Rating())->generateRatingBox($post);
WITH:
$BP_Rating = new Rating(); echo $BP_Rating->generateRatingBox($post);
HOPE IT HELPS!