PhotoReal Core Plugin (Internal)
The PhotoReal Core Plugin is the WordPress plugin that provides agent flow, scheduling, payout functionality, and more.
This is internal documentation written for the developers of PhotoReal.
Class
- Items checked for best practices
-
PRC_Payouts
-
PRC_Payouts
This class is responsible for managing payouts.
-
PRC_Payouts->handle_user_profile_update
This method is currently unused and awaiting use for the GF-based user profile.
-
PRC_Payouts->issue_partial_refund
Issues a partial refund, given a photo order ID and amount (in USD).
-
PRC_Payouts->get_and_maybe_create_stripe_customer
Returns, or creates if one does not exist, a Stripe customer based on an email provided.
-
PRC_Payouts->handle_issue_partial_refund
An internal method that is a callback to the issue-partial-refund REST route.
-
PRC_Payouts->register_issue_partial_refund_route
Internal method to register the issue-partial-refund REST route.
-
PRC_Payouts->register_routes
Internal method that registers all payout related REST routes.
-
PRC_Payouts->__construct
-
PRC_Payouts
-
PRC_Scheduling
-
PRC_Scheduling
This class is responsible for scheduling with calendar integrations.
-
PRC_Scheduling->add_booking_to_calendar
Adds a booking to the specified booking calendar of a user.
-
PRC_Scheduling->get_first_available_timeslot
Returns the first available timeslot for a given user.
-
PRC_Scheduling->get_user_range_available_time_slots
-
PRC_Scheduling->get_user_available_time_slots
Returns available timeslots for a user given a user ID, a date (in Y-m-d format), and required time (in minutes).
-
PRC_Scheduling->is_user_working_day_of_week
Returns whether a user has specified they are working on a given day of the week.
-
PRC_Scheduling->get_user_days_working
Returns data pertaining to the days a user has specified they are working.
-
PRC_Scheduling->clear_user
Disconnects a user from all calendar integrations.
-
PRC_Scheduling->register_calendar_integration
Registers a calendar integration with the PhotoReal Core plugin.
-
PRC_Scheduling->is_calendar_integration_loaded
Returns whether a calendar integration is loaded in the PhotoReal Core plugin.
-
PRC_Scheduling->handle_set_booking_calendar_request
An internal method that is a callback for the set-booking-calendar REST route.
-
PRC_Scheduling->array_by_base_key
-
PRC_Scheduling->handle_edit_scheduling_preferences
An internal method that is a callback for the edit-scheduling-preferences REST route.
-
PRC_Scheduling->register_routes
Internal method registering scheduling-related REST routes.
-
PRC_Scheduling->set_user_booking_calendar
-
PRC_Scheduling->get_user_booking_calendar
-
PRC_Scheduling->is_provider_used_for_booking_calendar
Returns whether a given provider is used as a user's set booking calendar.
-
PRC_Scheduling->determine_user_profile_readiness
Determines the readiness of a user's profile.
-
PRC_Scheduling->get_user_profile_readiness
Returns data relating to the readiness of a user's profile.
-
PRC_Scheduling->does_user_have_days_working_set
Returns whether a user has at least one day a week specified to work.
-
PRC_Scheduling->does_user_have_calendar_connected
Returns whether a user has any calendar integration connected.
-
PRC_Scheduling->delete_user_scheduling_option
Deletes a scheduling option of a user.
-
PRC_Scheduling->update_user_scheduling_option
Updates a scheduling option for a user.
-
PRC_Scheduling->get_user_scheduling_option
Returns the value of a scheduling option for a user.
-
PRC_Scheduling->get_integration_by_key
Returns the calendar integration instance, identified by the key (unlocalized name of the calendar integration) provided.
-
PRC_Scheduling->maybe_setup_current_user_meta
-
PRC_Scheduling->__construct
-
PRC_Scheduling
-
PRC_Order
-
Initiating an Order Refund
You can initiate an order refund by using the following code:
-
PRC_Order
-
PRC_Order->get_editor_checklist_items
Returns an array of checklist items for the editor.
-
PRC_Order->get_photographer_checklist_items
Returns a list of checklist items for the photographer of an order.
-
PRC_Order->get_agent_email
Returns the agent user email.
-
PRC_Order->get_agent_id
Returns the agent user ID.
-
PRC_Order->get_agent_status
Returns the status of the agent for an order.
-
PRC_Order->get_agent_full_name
Returns the full name of the agent who created a given order.
-
PRC_Order->get_agent_last_name
Returns the last name of the agent who created a given order.
-
PRC_Order->get_agent_first_name
Returns the first name of the agent who created a given order.
-
PRC_Order->maybe_load_agent_info
This method is called internally to parse and load properties from the agent_info ACF field.
-
PRC_Order->get_mileage
Returns the mileage for the photographer of an order.
-
PRC_Order->get_shoot_duration
Returns the shoot duration in minutes.
-
PRC_Order->get_gravity_forms_profile_id
Returns the Gravity Forms profile ID of an order.
-
PRC_Order->get_selected_photographer_id
Returns the user ID of the selected photographer of an order.
-
PRC_Order->get_selected_photographer_email
Returns the email of the selected photographer of an order.
-
PRC_Order->maybe_load_selected_services
This method is called internally to parse and load properties from the selected_services ACF field.
-
PRC_Order->get_total
Returns the total for an order.
-
PRC_Order->get_services_available
Returns the services selected in an order.
-
PRC_Order->get_id
Returns the post ID of an order.
-
PRC_Order->__construct
-
PRC_Order->get_data
Returns data from all public methods of PRC_Order.
-
Initiating an Order Refund
Editor API
These API endpoints are for editors who wish to manage uploads via API.
There are no API endpoints for editors at this time.
