chrispytoes
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Add fees to order from the admin save hookI solved it with this:
function lws_apply_coupon_price_admin($order_id) { $order = wc_get_order($order_id); $codes = $order->get_coupon_codes(); if(count($codes) > 0) { $fees = $order->get_fees(); $has_discount_tax = false; foreach($fees as $fee) { if($fee->get_name() === 'Discount Tax') { $has_discount_tax = true; break; } } if(!$has_discount_tax) { $amount = (float)$order->get_discount_tax(); $fee = new WC_Order_Item_Fee(); $fee->set_name('Discount Tax'); $fee->set_amount($amount); $fee->set_tax_class(''); $fee->set_tax_status('none'); $fee->set_total($amount); $order->add_item($fee); $order->calculate_totals(); $order->save(); } } } add_action('woocommerce_saved_order_items', 'lws_apply_coupon_price_admin');
Forum: Fixing WordPress
In reply to: Why does WordPress require FTP access to install plugins?Thank you! I think I got it, I just set the owner of my ‘customer-sites’ directory to my ftp user with the group www-data.
- This reply was modified 7 years, 7 months ago by chrispytoes.
- This reply was modified 7 years, 7 months ago by chrispytoes.
- This reply was modified 7 years, 7 months ago by chrispytoes.
Forum: Fixing WordPress
In reply to: Why does WordPress require FTP access to install plugins?My www directory is owned by my nginx user and group: www-data, with 755 permissions on everything in this directory. Inside there I have a directory called ‘customer-sites’ which contains multiple webroots for different sites, and it is recursively owned by my FTP user. I’m not sure which user PHP is running on, is there a way to check and see? Also if I change the owner to the PHP user I still need my ‘customer-sites’ folder read/write-able from my FTP user.
Forum: Fixing WordPress
In reply to: wp-admin page redirects to home pageThanks so much! It worked.
Forum: Fixing WordPress
In reply to: wp-admin page redirects to home pageThe admin page HAS worked before I just haven’t touched in a month and now this. Disabling plugins did not work, when I tried switching the theme the way you said the website is now just blank white and when I go to the admin page its still just blank white. I left it this way so you can see.
Forum: Fixing WordPress
In reply to: wp-admin page redirects to home pageThe last thing I did was make a 404 page which was about a month ago. I just tried to get back on it now and then this happens. The only plugin I have installed is Meta Slider. I made the theme myself.