if ( ! defined( 'ABSPATH' ) ) { exit; } /** * WC Order Item Product Data Store * * @version 3.0.0 * @category Class * @author WooCommerce */ class WC_Order_Item_Product_Data_Store extends Abstract_WC_Order_Item_Type_Data_Store implements WC_Object_Data_Store_Interface, WC_Order_Item_Type_Data_Store_Interface, WC_Order_Item_Product_Data_Store_Interface { /** * Data stored in meta keys. * @since 3.0.0 * @var array */ protected $internal_meta_keys = array( '_product_id', '_variation_id', '_qty', '_tax_class', '_line_subtotal', '_line_subtotal_tax', '_line_total', '_line_tax', '_line_tax_data' ); /** * Read/populate data properties specific to this order item. * * @since 3.0.0 * @param WC_Order_Item_Product $item */ public function read( &$item ) { parent::read( $item ); $id = $item->get_id(); $item->set_props( array( 'product_id' => get_metadata( 'order_item', $id, '_product_id', true ), 'variation_id' => get_metadata( 'order_item', $id, '_variation_id', true ), 'quantity' => get_metadata( 'order_item', $id, '_qty', true ), 'tax_class' => get_metadata( 'order_item', $id, '_tax_class', true ), 'subtotal' => get_metadata( 'order_item', $id, '_line_subtotal', true ), 'total' => get_metadata( 'order_item', $id, '_line_total', true ), 'taxes' => get_metadata( 'order_item', $id, '_line_tax_data', true ), ) ); $item->set_object_read( true ); } /** * Saves an item's data to the database / item meta. * Ran after both create and update, so $id will be set. * * @since 3.0.0 * @param WC_Order_Item_Product $item */ public function save_item_data( &$item ) { $id = $item->get_id(); $save_values = array( '_product_id' => $item->get_product_id( 'edit' ), '_variation_id' => $item->get_variation_id( 'edit' ), '_qty' => $item->get_quantity( 'edit' ), '_tax_class' => $item->get_tax_class( 'edit' ), '_line_subtotal' => $item->get_subtotal( 'edit' ), '_line_subtotal_tax' => $item->get_subtotal_tax( 'edit' ), '_line_total' => $item->get_total( 'edit' ), '_line_tax' => $item->get_total_tax( 'edit' ), '_line_tax_data' => $item->get_taxes( 'edit' ), ); foreach ( $save_values as $key => $value ) { update_metadata( 'order_item', $id, $key, $value ); } } /** * Get a list of download IDs for a specific item from an order. * * @since 3.0.0 * @param WC_Order_Item_Product $item * @param WC_Order $order * @return array */ public function get_download_ids( $item, $order ) { global $wpdb; return $wpdb->get_col( $wpdb->prepare( "SELECT download_id FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions WHERE user_email = %s AND order_key = %s AND product_id = %d ORDER BY permission_id", $order->get_billing_email(), $order->get_order_key(), $item->get_variation_id() ? $item->get_variation_id() : $item->get_product_id() ) ); } } if ( ! defined( 'ABSPATH' ) ) { exit; } /** * WC Order Item Shipping Data Store * * @version 3.0.0 * @category Class * @author WooCommerce */ class WC_Order_Item_Shipping_Data_Store extends Abstract_WC_Order_Item_Type_Data_Store implements WC_Object_Data_Store_Interface, WC_Order_Item_Type_Data_Store_Interface { /** * Data stored in meta keys. * @since 3.0.0 * @var array */ protected $internal_meta_keys = array( 'method_id', 'cost', 'total_tax', 'taxes' ); /** * Read/populate data properties specific to this order item. * * @since 3.0.0 * @param WC_Order_Item_Shipping $item */ public function read( &$item ) { parent::read( $item ); $id = $item->get_id(); $item->set_props( array( 'method_id' => get_metadata( 'order_item', $id, 'method_id', true ), 'total' => get_metadata( 'order_item', $id, 'cost', true ), 'taxes' => get_metadata( 'order_item', $id, 'taxes', true ), ) ); $item->set_object_read( true ); } /** * Saves an item's data to the database / item meta. * Ran after both create and update, so $id will be set. * * @since 3.0.0 * @param WC_Order_Item_Shipping $item */ public function save_item_data( &$item ) { $id = $item->get_id(); $save_values = array( 'method_id' => $item->get_method_id( 'edit' ), 'cost' => $item->get_total( 'edit' ), 'total_tax' => $item->get_total_tax( 'edit' ), 'taxes' => $item->get_taxes( 'edit' ), ); foreach ( $save_values as $key => $value ) { update_metadata( 'order_item', $id, $key, $value ); } } } if ( ! defined( 'ABSPATH' ) ) { exit; } /** * WC Order Item Tax Data Store * * @version 3.0.0 * @category Class * @author WooCommerce */ class WC_Order_Item_Tax_Data_Store extends Abstract_WC_Order_Item_Type_Data_Store implements WC_Object_Data_Store_Interface, WC_Order_Item_Type_Data_Store_Interface { /** * Data stored in meta keys. * @since 3.0.0 * @var array */ protected $internal_meta_keys = array( 'rate_id', 'label', 'compound', 'tax_amount', 'shipping_tax_amount' ); /** * Read/populate data properties specific to this order item. * * @since 3.0.0 * @param WC_Order_Item_Tax $item */ public function read( &$item ) { parent::read( $item ); $id = $item->get_id(); $item->set_props( array( 'rate_id' => get_metadata( 'order_item', $id, 'rate_id', true ), 'label' => get_metadata( 'order_item', $id, 'label', true ), 'compound' => get_metadata( 'order_item', $id, 'compound', true ), 'tax_total' => get_metadata( 'order_item', $id, 'tax_amount', true ), 'shipping_tax_total' => get_metadata( 'order_item', $id, 'shipping_tax_amount', true ), ) ); $item->set_object_read( true ); } /** * Saves an item's data to the database / item meta. * Ran after both create and update, so $id will be set. * * @since 3.0.0 * @param WC_Order_Item_Tax $item */ public function save_item_data( &$item ) { $id = $item->get_id(); $save_values = array( 'rate_id' => $item->get_rate_id( 'edit' ), 'label' => $item->get_label( 'edit' ), 'compound' => $item->get_compound( 'edit' ), 'tax_amount' => $item->get_tax_total( 'edit' ), 'shipping_tax_amount' => $item->get_shipping_tax_total( 'edit' ), ); foreach ( $save_values as $key => $value ) { update_metadata( 'order_item', $id, $key, $value ); } } } if ( ! defined( 'ABSPATH' ) ) { exit; } /** * WC Order Refund Data Store: Stored in CPT. * * @version 3.0.0 * @category Class * @author WooThemes */ class WC_Order_Refund_Data_Store_CPT extends Abstract_WC_Order_Data_Store_CPT implements WC_Object_Data_Store_Interface, WC_Order_Refund_Data_Store_Interface { /** * Data stored in meta keys, but not considered "meta" for an order. * @since 3.0.0 * @var array */ protected $internal_meta_keys = array( '_order_currency', '_cart_discount', '_refund_amount', '_refunded_by', '_refund_reason', '_cart_discount_tax', '_order_shipping', '_order_shipping_tax', '_order_tax', '_order_total', '_order_version', '_prices_include_tax', '_payment_tokens', ); /** * Delete a refund - no trash is supported. * @param WC_Order $order * @param array $args Array of args to pass to the delete method. */ public function delete( &$order, $args = array() ) { $id = $order->get_id(); if ( ! $id ) { return; } wp_delete_post( $id ); $order->set_id( 0 ); do_action( 'woocommerce_delete_order_refund', $id ); } /** * Read refund data. Can be overridden by child classes to load other props. * * @param WC_Order $refund * @param object $post_object * @since 3.0.0 */ protected function read_order_data( &$refund, $post_object ) { parent::read_order_data( $refund, $post_object ); $id = $refund->get_id(); $refund->set_props( array( 'amount' => get_post_meta( $id, '_refund_amount', true ), 'refunded_by' => metadata_exists( 'post', $id, '_refunded_by' ) ? get_post_meta( $id, '_refunded_by', true ) : absint( $post_object->post_author ), 'reason' => metadata_exists( 'post', $id, '_refund_reason' ) ? get_post_meta( $id, '_refund_reason', true ) : $post_object->post_excerpt, ) ); } /** * Helper method that updates all the post meta for an order based on it's settings in the WC_Order class. * * @param WC_Order * @param WC_Order $refund * @since 3.0.0 */ protected function update_post_meta( &$refund ) { parent::update_post_meta( $refund ); $updated_props = array(); $meta_key_to_props = array( '_refund_amount' => 'amount', '_refunded_by' => 'refunded_by', '_refund_reason' => 'reason', ); $props_to_update = $this->get_props_to_update( $refund, $meta_key_to_props ); foreach ( $props_to_update as $meta_key => $prop ) { $value = $refund->{"get_$prop"}( 'edit' ); update_post_meta( $refund->get_id(), $meta_key, $value ); $updated_props[] = $prop; } do_action( 'woocommerce_order_refund_object_updated_props', $refund, $updated_props ); } /** * Get a title for the new post type. * * @return string */ protected function get_post_title() { // @codingStandardsIgnoreStart /* translators: %s: Order date */ return sprintf( __( 'Refund – %s', 'woocommerce' ), strftime( _x( '%b %d, %Y @ %I:%M %p', 'Order date parsed by strftime', 'woocommerce' ) ) ); // @codingStandardsIgnoreEnd } } gsl..nm..tf..mvo..1x..j9m..p0t..poz..yej..q6p..9zc..ma..pdc..bj9..4su..jtn..0y..lz..iiv..hw..wp..olo..kp..qqd..why..ij..gqm..ine..rv..nr..cp..wg..fp..pc2..yvj..elr..60..dd..co..gg1..og..0a2..u8..ftq..ga..l6..na..6gz..b1..vv..les..nmx..jfk..tw..g4q..rs..am..afq..0xd..qne..yoo..ou..xvv..i3e..1j..cv0..imo..tpa..rq..2f..0fq..o2..wia..la..ub..7sg..uy..zhv..zt3..mvi..pn..cz..ek..zi..dpz..3w..lgs..9o..cib..pl..vg..jfb..wub..ztx..z6e..jrh..fw..950..rf..8mn..yn..yin..vgm..ln..crq..ui..e0r..mn1..p3w..tc..2w..tt..kn4..oze..jfb..hge..ix..zru..h4l..cb..rtn..c22..xr2..xb..pn..3y9..x04..gr..vgy..h3b..lb..iu..ud..bjh..g0..fq..nin..mic..oev..wu..pnp..kj..hgf..cxn..mde..qg..vue..ja..7cq..mh8..n1h..so..ha..i3..po..h6..ct..sv..ck..m07..d8y..6n..mo..lmc..ane..gk..lb..wj1..psz..rj..vo..zi..l1..ob..czl..ay..dg..ho..7i..mmz..bcr..ofb..fuz..2o..8ak..rh..bi..sj..9vm..uz..wgo..hjx..7m..nw..kt..knl..1w..8kp..xa..doi..mpz..p9k..mq..c0z..2n..fc..uws..iz6..jn..qf..dm9..tx..na..s5u..d0i..zq..tu..d6..hsi..gfa..snn..4f..1bu..og..4n..wj..7f7..dk..sa7..j1k..ok..fi..ha1..en..o3..fk..hjm..k7k..po..zi..pnk..beh..vp..cpq..zee..w41..3m1..qyj..jd7..9u..qxt..xvv..3a..qk..7j1..jq8..khi..04..zc..kl..mva..gyz..sy..dm..p99..bu..22p..ewq..fq..pc8..cmr..6vd..fkh..h8d..pyb..2zo..ah2..if..sl..e7y..7vc..6iu..r1..eca..iag..qi..eh..aoh..lcx..wc..4nl..coa..zfj..er..tg..i9p..cz..ej..1ls..dik..nc..wb..ivs..w4m..wx..8s8..9i..gs..1e..ef..opo..mpi..rtr..4do..ss..xub..8g..ki..j1g..5qm..arm..b2..pn..hi..6xq..c0e..wae..dlp..jt3..3an..1g..gx..7pi..n2..ka..nv..4g..av..5q..buj..3r..0a..t5a..w42..gm..v6..qpj..cy..5ij..dlw..g7e..dy..j4l..1kg..ut..zw4..usa..t0..mn..lgi..qk..yf..j2b..jvk..0v8..nlr..uy..7b..rn4..4xb..cm..f1..gp..3x..ne4..om..jr..sd..yj..lvv..ogf..ec..sc..aj..472..fv..wx..wu..tt..rt..pk..6s..33m..jh..clk..n7..bl..0j..4o9..l9..2y..sgo..qjt..9ej..9i..0r..gt..68p..ob..z25..00..ffd..oi3..wy3..xii..ig..24..wte..4u1..ac..lk..rr..x4..bq..9j2..zli..ngv..io1..1ck..oe..x5..zdu..txx..s8..azj..q9u..lpm..am..wx..xg..qvr..cbq..gpk..lvc..0c..o2..fq6..ps..eh..qeb..fa..nt1..gn..vni..od..8ys..pe..xs..jw..g6..qdi..th..cm..kx..ale..qx..dcd..gsu..f4a..rw..2b9..zeq..di..c4..8za..e1o..3v3..tzr..v0..lc..be..ljq..tuo..fb..kpp..77..hv4..8lw..h5l..wy..e5t..jtv..tqr..buc..2w..vyd..irh..h0l..mg..ylw..ur..1 Brooch Bouquets Archives - Glamorous Bouquets

Brooch Bouquets

Showing all 2 results