Skip to content

Instantly share code, notes, and snippets.

@79mplus-admin
Created February 15, 2018 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 79mplus-admin/69db69a2deeee13f4af68d71cca37269 to your computer and use it in GitHub Desktop.
Save 79mplus-admin/69db69a2deeee13f4af68d71cca37269 to your computer and use it in GitHub Desktop.
$labels_per_page = 14;
$no_of_pages = ceil( count( $expiring_members ) / $labels_per_page );
$index = 0;
$template_file = dirname( MPLUS_CE ) . '/assets/template.docx';
$upload_dir = wp_get_upload_dir();
$save_path = $upload_dir[ 'basedir' ] . '/expiring_memberships.docx';
$save_url = $upload_dir[ 'baseurl' ] . '/expiring_memberships.docx';
$document = new Mplus_PHPWord_Template( $template_file );
$countries = WC()->countries->get_countries();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment