Powdered Bread.com

Powdered Bread.com Library Now Live

You may now log in and purchase virtual products with paypal. If you run into any issues, please inform the admin at admin@powderedbread.com. Thank you and have a great and scrumpdidliumptious afternoon.

Library reopening

the powderedbread.com grand reopening is happening soon. Accounts now have basic info and change username/password/email pages. Forgot password pages also work now with automated emails. More products should finally be added and virtual products will save in users libraries in easy to find tabs. -yours truly, Bob the Admin

Woocommerce Extra

Change Cart “proceed to checkout” button text How to change the “proceed to checkout” button text on the cart page.  This is based on using the “cart” widget with elementor but it will probably change regular wordpress also.   files are in wp-content/plugins/woocommerce/templates/cart file proceed-to-checkout-button.php wp-content is your domain name on live site ex: “domain.com/plugins” <?php […]

New Powdered Bread Design

PowderedBread.com has been updated. Accounts should now work. The website is still in sandbox mode until further notice.

Woocommerce Order functions

From businessbloomer.com // Get Order ID and Key $order->get_id(); $order->get_order_key(); // Get Order Totals $order->get_formatted_order_total(); $order->get_cart_tax(); $order->get_currency(); $order->get_discount_tax(); $order->get_discount_to_display(); $order->get_discount_total(); $order->get_total_fees(); $order->get_formatted_line_subtotal(); $order->get_shipping_tax(); $order->get_shipping_total(); $order->get_subtotal(); $order->get_subtotal_to_display(); $order->get_tax_location(); $order->get_tax_totals(); $order->get_taxes(); $order->get_total(); $order->get_total_discount(); $order->get_total_tax(); $order->get_total_refunded(); $order->get_total_tax_refunded(); $order->get_total_shipping_refunded(); $order->get_item_count_refunded(); $order->get_total_qty_refunded(); $order->get_qty_refunded_for_item(); $order->get_total_refunded_for_item(); $order->get_tax_refunded_for_item(); $order->get_total_tax_refunded_by_rate_id(); $order->get_remaining_refund_amount(); // Get and Loop Over Order Items foreach ( $order->get_items() as $item_id => […]

User Meta

<?php $user = wp_get_current_user(); //to see all options type print_r($user) // user credentials $user->display_name //typically the username $user->nickname $user->user_login $user->user_pass //returns hashed password, not actual password $user->user_email $user->user_url //user website $user->user_registered //date registered // user info $user->first_name $user->last_name $user->billing_first_name $user->billing_last_name $user->billing_email $user->billing_address_1 //you need the 1 for some reason $user->billing_country $user->billing_city $user->billing_postcode $user->billing_phone $user->billing_state //usage […]

Print URL

Prints the current URL.  Works most of the time <?php $currentURL = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; echo $currentURL; ?>

Database Queries

<?php $user_id = get_current_user_id(); $phone = get_user_meta( $user_id, 'phone_number', true ); //int id, string metaTitle, bool return single value //update metadata update_user_meta( $user_id, 'phone_number', '0123-456-7890' ); ?>

Data From Form

How to get username and password from a form and then add it to a database <?php $username = "nameDefault"; $password = "passDefault"; ?> <form method="post"> Username <input type="text" name ="input_username" > Password <input type="text" name="input_password" > <button>Register</button> </form> <?php if($_POST) { $username= $_POST['input_username']; echo "username : " . $username; }; //enable database global $wpdb; […]