WC_Shipping_Shipcloud_Order_Bulk
in package
Table of Contents
- __construct() : void
- Constructor
- add_bulk_actions() : array<string|int, mixed>
- Adding bulk action to dropdown
- admin_enqueue_scripts() : mixed
- admin_print_footer_scripts() : void
- Adding Footer Scripts
- handle_bulk_actions() : string
- Handle bulk actions.
- add_admin_download() : void
- Add a new download for admin.
- add_admin_notice() : void
- Output an admin notice.
- create_pdf() : mixed
- create_pickup_request() : mixed
- get_option() : mixed|string
- Getting option (overwrite instance values if there option of instance is empty
- get_storage_path() : string
- Get the PATH to shipcloud files.
- get_storage_url() : string
- Get the URL to some Shipcloud files.
- get_wp_filesystem() : WP_Filesystem_Base
- Get wp filesystem adapter.
- init() : void
- Initialize Hooks
- log() : void
- Output a debug message.
- save_pdf_to_storage() : string
- Download the label PDF.
Methods
__construct()
Constructor
public
__construct() : void
Return values
void —add_bulk_actions()
Adding bulk action to dropdown
public
add_bulk_actions(array<string|int, mixed> $actions) : array<string|int, mixed>
Parameters
- $actions : array<string|int, mixed>
-
Bulk actions
Return values
array<string|int, mixed> —$actions Bulk actions with own Actions
admin_enqueue_scripts()
public
admin_enqueue_scripts() : mixed
Return values
mixed —admin_print_footer_scripts()
Adding Footer Scripts
public
admin_print_footer_scripts() : void
Return values
void —handle_bulk_actions()
Handle bulk actions.
public
handle_bulk_actions(string $redirect_to, string $action, array<string|int, mixed> $order_ids) : string
Parameters
- $redirect_to : string
-
URL to redirect to.
- $action : string
-
Action name.
- $order_ids : array<string|int, mixed>
-
List of ids.
Return values
string —add_admin_download()
Add a new download for admin.
private
add_admin_download( $url) : void
Parameters
Return values
void —add_admin_notice()
Output an admin notice.
private
add_admin_notice(string $message[, string $type = 'info' ][, bool $dismissible = true ]) : void
Parameters
- $message : string
-
Debug message.
- $type : string = 'info'
-
Message type.
- $dismissible : bool = true
-
Message type.
Return values
void —create_pdf()
private
create_pdf(mixed $order_ids) : mixed
Parameters
- $order_ids : mixed
Return values
mixed —create_pickup_request()
private
create_pickup_request(mixed $order_ids) : mixed
Parameters
- $order_ids : mixed
Return values
mixed —get_option()
Getting option (overwrite instance values if there option of instance is empty
private
get_option(string $key[, null $empty_value = null ]) : mixed|string
Parameters
- $key : string
- $empty_value : null = null
Return values
mixed|string —get_storage_path()
Get the PATH to shipcloud files.
private
get_storage_path([mixed $suffix = null ]) : string
Parameters
- $suffix : mixed = null
Tags
Return values
string —get_storage_url()
Get the URL to some Shipcloud files.
private
get_storage_url([null|string $suffix = null ]) : string
Parameters
- $suffix : null|string = null
-
Path and name of the file.
Return values
string —get_wp_filesystem()
Get wp filesystem adapter.
private
get_wp_filesystem() : WP_Filesystem_Base
Tags
Return values
WP_Filesystem_Base —init()
Initialize Hooks
private
init() : void
Return values
void —log()
Output a debug message.
private
log(string $message[, string $level = 'info' ][, mixed $context = [] ]) : void
Parameters
- $message : string
-
Debug message.
- $level : string = 'info'
-
Debug level.
- $context : mixed = []
-
The Debug context.
Return values
void —save_pdf_to_storage()
Download the label PDF.
private
save_pdf_to_storage(int $order_id, string $url, string $prefix) : string
Parameters
- $order_id : int
- $url : string
-
URL to the PDF as given by the API.
- $prefix : string
-
prefix that will be added to the filename
